(writer io.Writer, req *submit.Request, baseURL string, quiet bool)
| 88 | } |
| 89 | |
| 90 | func 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 | |
| 108 | func printConfigHelp(writer io.Writer) { |
| 109 | fmt.Fprintln(writer, `You can configure blocklists for packages and mirrors by creating or editing /etc/pkgstats.yaml. |
no test coverage detected