~ogham/doom

508d217f0d25bfbad3a84e92b10ab810f97d213c — Benjamin Sago 1 year, 8 months ago 5c779a3
Skip comments in secrets files
1 files changed, 5 insertions(+), 0 deletions(-)

M msecrets/secrets.go
M msecrets/secrets.go => msecrets/secrets.go +5 -0
@@ 74,6 74,11 @@ func (s *Secrets) Read() {
        line := scanner.Text()
        linum += 1

        if strings.HasPrefix(line, "#") {
            // this line is a comment
            continue
        }

        secretName, secretValue, found := strings.Cut(line, "=")
        if ! found {
            log.Printf("Weird line (#%d) in secrets file", linum)