(client *http.Client, method string, req interface{})
| 112 | } |
| 113 | |
| 114 | func pluginRequest(client *http.Client, method string, req interface{}) (io.Reader, error) { |
| 115 | b, err := json.Marshal(req) |
| 116 | if err != nil { |
| 117 | return nil, err |
| 118 | } |
| 119 | if req == nil { |
| 120 | b = []byte{} |
| 121 | } |
| 122 | resp, err := client.Post("http://localhost"+method, "application/json", bytes.NewReader(b)) |
| 123 | if err != nil { |
| 124 | return nil, err |
| 125 | } |
| 126 | |
| 127 | return resp.Body, nil |
| 128 | } |
| 129 | |
| 130 | type testPlugin struct { |
| 131 | volumes []string |
no outgoing calls
no test coverage detected
searching dependent graphs…