Merge pull request #11 from numtide/ci

Ci
main
Jörg Thalheim 2 years ago committed by GitHub
commit f86721c4d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,7 @@
cut_body_after = "" # don't include text from the PR body in the merge commit message
status = [
"Evaluate flake.nix",
"package %",
"check %",
"devShell %",
]

@ -117,7 +117,7 @@ func (s *server) serveConnection(conn *net.UnixConn) {
}
val, ok := secretMap[*secret]
if ok {
if _, err = io.WriteString(conn, val); err != nil {
if _, err = io.WriteString(conn, fmt.Sprint(val)); err != nil {
log.Printf("Failed to send secret: %v", err)
}
} else {

@ -6,12 +6,12 @@ import (
"os"
)
func parseServiceSecrets(path string) (map[string]string, error) {
func parseServiceSecrets(path string) (map[string]interface{}, error) {
content, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("Cannot read json file '%s': %w", path, err)
}
var data map[string]string
var data map[string]interface{}
err = json.Unmarshal(content, &data)
if err != nil {
return nil, fmt.Errorf("Cannot parse '%s' as json file: %w", path, err)

@ -134,7 +134,7 @@ func (s *server) watch(inotifyFd int) {
log.Printf("Secret map % has no value for key %s", fname, conn.key)
continue
}
_, err = io.WriteString(conn.connection, val)
_, err = io.WriteString(conn.connection, fmt.Sprint(val))
if err == nil {
log.Printf("Served %s to %s", fname, conn.connection.RemoteAddr().String())
} else {

Loading…
Cancel
Save