MCPcopy Create free account
hub / github.com/archlinux-de/pkgstats-cli / submitRequest

Function submitRequest

cmd/submit.go:90–106  ·  view source on GitHub ↗
(writer io.Writer, req *submit.Request, baseURL string, quiet bool)

Source from the content-addressed store, hash-verified

88}
89
90func submitRequest(writer io.Writer, req *submit.Request, baseURL string, quiet bool) error {
91 if !quiet {
92 fmt.Fprintln(writer, "Submitting data...")
93 }
94
95 client := submit.NewClient(baseURL)
96
97 if err := client.SendRequest(*req); err != nil {
98 return err
99 }
100
101 if !quiet {
102 fmt.Fprintln(writer, "Data were successfully sent")
103 }
104
105 return nil
106}
107
108func printConfigHelp(writer io.Writer) {
109 fmt.Fprintln(writer, `You can configure blocklists for packages and mirrors by creating or editing /etc/pkgstats.yaml.

Callers 1

newSubmitCmdFunction · 0.85

Calls 2

SendRequestMethod · 0.95
NewClientFunction · 0.92

Tested by

no test coverage detected