(flags map[string]string)
| 70 | } |
| 71 | |
| 72 | func BuildArgs(flags map[string]string) []string { |
| 73 | args := make([]string, 0, len(flags)) |
| 74 | |
| 75 | for name, value := range flags { |
| 76 | if value != "" { |
| 77 | args = append(args, name+"="+value) |
| 78 | } else { |
| 79 | args = append(args, name) |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | return args |
| 84 | } |
| 85 | |
| 86 | func GetRequest(url string) (*http.Response, error) { |
| 87 | const timeout = 1 * time.Second |
no outgoing calls
no test coverage detected