-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
I don't know if it is a bug or an intended/designed choose.
package main
import (
"fmt"
"io"
"github.com/muesli/reflow/padding"
)
func main() {
width := uint(6)
b := []byte("foo")
// padding uses spaces per default:
f := padding.NewWriter(width, nil)
// but you can also use a custom padding function:
f = padding.NewWriter(width, func(w io.Writer) {
w.Write([]byte("."))
})
f.Write(b)
f.Close()
// foo...
fmt.Println(f.String())
f.Write(b)
f.Close()
// foo...foo
fmt.Println(f.String())
}
Metadata
Metadata
Assignees
Labels
No labels