()
| 8 | ) |
| 9 | |
| 10 | func ExampleWriteOptions() { |
| 11 | opts := []Option{ |
| 12 | NewOption("foo", map[string]string{ |
| 13 | "param": "hello, world!", |
| 14 | }), |
| 15 | NewOption("bar", nil), |
| 16 | NewOption("b a z", nil), |
| 17 | } |
| 18 | |
| 19 | buf := bytes.Buffer{} |
| 20 | bw := bufio.NewWriter(&buf) |
| 21 | |
| 22 | WriteOptions(bw, opts) |
| 23 | bw.Flush() |
| 24 | |
| 25 | // Output: foo;param="hello, world!",bar,"b a z" |
| 26 | fmt.Println(buf.String()) |
| 27 | } |
| 28 | |
| 29 | func TestWriteOptions(t *testing.T) { |
| 30 | for _, test := range []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…