Monorepo for Tangled tangled.org

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
··· 4 4 "fmt" 5 5 ) 6 6 7 - func formatKeyData(repoguardPath, gitDir, logPath string, data []map[string]interface{}) string { 7 + func formatKeyData(repoguardPath, gitDir, logPath, endpoint string, data []map[string]interface{}) string { 8 8 var result string 9 9 for _, entry := range data { 10 10 result += fmt.Sprintf( 11 - `command="%s -base-dir %s -user %s -log-path %s",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s`+"\n", 12 - repoguardPath, gitDir, entry["did"], logPath, entry["key"]) 11 + `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", 12 + repoguardPath, gitDir, entry["did"], logPath, endpoint, entry["key"]) 13 13 } 14 14 return result 15 15 }
+1 -1
cmd/keyfetch/main.go
··· 42 42 log.Fatalf("error unmarshalling response body: %v", err) 43 43 } 44 44 45 - fmt.Print(formatKeyData(*repoguardPath, *gitDir, *logPath, data)) 45 + fmt.Print(formatKeyData(*repoguardPath, *gitDir, *logPath, *endpoint, data)) 46 46 }