forked from tangled.org/core
this repo has no description

pass internal-api endpoint from keyfetch to repoguard

no point in customizing the endpoint in keyfetch, if it is not propagated through to repoguard

Tangled 3f9986a4 710e2e63

Changed files
+4 -4
cmd
keyfetch
+3 -3
cmd/keyfetch/format.go
···
"fmt"
)
-
func formatKeyData(repoguardPath, gitDir, logPath string, data []map[string]interface{}) string {
var result string
for _, entry := range data {
result += fmt.Sprintf(
-
`command="%s -base-dir %s -user %s -log-path %s",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s`+"\n",
-
repoguardPath, gitDir, entry["did"], logPath, entry["key"])
}
return result
}
···
"fmt"
)
+
func formatKeyData(repoguardPath, gitDir, logPath, endpoint string, data []map[string]interface{}) string {
var result string
for _, entry := range data {
result += fmt.Sprintf(
+
`command="%s -base-dir %s -user %s -log-path %s -internal-api %s",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s`+"\n",
+
repoguardPath, gitDir, entry["did"], logPath, endpoint, entry["key"])
}
return result
}
+1 -1
cmd/keyfetch/main.go
···
log.Fatalf("error unmarshalling response body: %v", err)
}
-
fmt.Print(formatKeyData(*repoguardPath, *gitDir, *logPath, data))
}
···
log.Fatalf("error unmarshalling response body: %v", err)
}
+
fmt.Print(formatKeyData(*repoguardPath, *gitDir, *logPath, *endpoint, data))
}