MCPcopy
hub / github.com/getsops/sops / encodeValue

Method encodeValue

stores/ini/store.go:184–191  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

182}
183
184func (store Store) encodeValue(v interface{}) ([]byte, error) {
185 switch v := v.(type) {
186 case sops.TreeBranches:
187 return store.encodeTree(v)
188 default:
189 return json.Marshal(v)
190 }
191}
192
193// EmitValue returns a single value encoded in a generic interface{} as bytes
194func (store *Store) EmitValue(v interface{}) ([]byte, error) {

Callers 1

EmitValueMethod · 0.95

Implementers 5

Storestores/dotenv/store.go
Storestores/ini/store.go
Storestores/yaml/store.go
Storestores/json/store.go
BinaryStorestores/json/store.go

Calls 1

encodeTreeMethod · 0.95

Tested by

no test coverage detected