MCPcopy
hub / github.com/tinyauthapp/tinyauth / ParseSecretFile

Function ParseSecretFile

internal/utils/security_utils.go:31–42  ·  view source on GitHub ↗
(contents string)

Source from the content-addressed store, hash-verified

29}
30
31func ParseSecretFile(contents string) string {
32 lines := strings.Split(contents, "\n")
33
34 for _, line := range lines {
35 if strings.TrimSpace(line) == "" {
36 continue
37 }
38 return strings.TrimSpace(line)
39 }
40
41 return ""
42}
43
44func GetBasicAuth(username string, password string) string {
45 auth := username + ":" + password

Callers 2

TestParseSecretFileFunction · 0.92
GetSecretFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseSecretFileFunction · 0.74