main is the entry point for the application.
()
| 10 | |
| 11 | // main is the entry point for the application. |
| 12 | func main() { |
| 13 | // Create a Buffer value and write a string to the buffer. |
| 14 | // Using the Write method that implements io.Writer. |
| 15 | var b bytes.Buffer |
| 16 | b.Write([]byte("Hello ")) |
| 17 | |
| 18 | // Use Fprintf to concatenate a string to the Buffer. |
| 19 | // Passing the address of a bytes.Buffer value for io.Writer. |
| 20 | fmt.Fprintf(&b, "World!") |
| 21 | |
| 22 | // Write the content of the Buffer to the stdout device. |
| 23 | // Passing the address of a os.File value for io.Writer. |
| 24 | b.WriteTo(os.Stdout) |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected