func ExampleBuffer_WriteFile() {
	var lines lines.Buffer
	lines.AddLineF("A simple line")
	lines.AddLineF("Trailing new lines are not needed\n")
	lines.AddLineF("You can use %s arguments", "fmt.Printf")

	err := lines.WriteFile("/tmp/example")
	if err != nil {
		panic(err)
	}
	// read the content of the file just written
	content, _ := os.ReadFile("/tmp/example")
	os.Remove("/tmp/example")
	fmt.Print(string(content))
	// Output: A simple line
	// Trailing new lines are not needed
	//
	// You can use fmt.Printf arguments
}
// This example show how to use a lines.Buffer
This example show how to use a lines.Buffer
// This example show how to use a lines . Buffer
func ExampleBuffer_WriteFile() {
	var lines lines.Buffer
	lines.AddLineF("A simple line")
	lines.AddLineF("Trailing new lines are not needed\n")
	lines.AddLineF("You can use %s arguments", "fmt.Printf")
	err := lines.WriteFile("/tmp/example")
	if err != nil {
		panic(err)
	}
	content, _ := os.ReadFile("/tmp/example")
	os.Remove("/tmp/example")
	fmt.Print(string(content))
	 You can use fmt.Printf arguments
}
func ExampleBuffer_WriteFile ( ) { var lines lines . Buffer lines . AddLineF ( " " ) lines . AddLineF ( " \n " ) lines . AddLineF ( " " , " " ) err := lines . WriteFile ( " " ) if err != nil { panic ( err ) } content , _ := os . ReadFile ( " " ) os . Remove ( " " ) fmt . Print ( string ( content ) ) }
This example show how to use a lines.Buffer
This example show how to use a lines . Buffer
// read the content of the file just written // Output: A simple line // Trailing new lines are not needed // // You can use fmt.Printf arguments