5975b5ed5c
Cleaned up file naming/organization, optimized some things like using preallocated indexed slices instead of appends, etc.
15 lines
403 B
Go
15 lines
403 B
Go
package libsecret
|
|
|
|
// NewSecret returns a pointer to a new Secret based on a Session, parameters, (likely an empty byte slice), a value, and the MIME content type.
|
|
func NewSecret(session *Session, params []byte, value []byte, contentType string) (secret *Secret) {
|
|
|
|
secret = &Secret{
|
|
Session: session.Path(),
|
|
Parameters: params,
|
|
Value: value,
|
|
ContentType: contentType,
|
|
}
|
|
|
|
return
|
|
}
|