MCPcopy Create free account
hub / github.com/getsops/sops / FormatForPathOrString

Function FormatForPathOrString

cmd/sops/formats/formats.go:72–78  ·  view source on GitHub ↗

FormatForPathOrString returns the correct format-specific implementation of the Store interface given the formatString if specified, or the path to a file. This is to support the cli, where both are provided.

(path, format string)

Source from the content-addressed store, hash-verified

70// of the Store interface given the formatString if specified, or the path to a file.
71// This is to support the cli, where both are provided.
72func FormatForPathOrString(path, format string) Format {
73 formatFmt, found := stringToFormat[format]
74 if !found {
75 formatFmt = FormatForPath(path)
76 }
77 return formatFmt
78}

Callers 3

FileFunction · 0.85

Calls 1

FormatForPathFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…