Skip to content

Commit

Permalink
rename example
Browse files Browse the repository at this point in the history
  • Loading branch information
convto committed May 8, 2022
1 parent a71cabe commit 9874839
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bit_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ func ExampleEncodeToString() {
// 01001000011001010110110001101100011011110010000001000111011011110111000001101000011001010111001000100001
}

func ExampleEncoder_Write() {
func ExampleNewEncoder() {
src := []byte("Hello Gopher!")
enc := NewEncoder(os.Stdout)

enc.Write(src)

// Output:
// 01001000011001010110110001101100011011110010000001000111011011110111000001101000011001010111001000100001
}
Expand Down Expand Up @@ -66,10 +68,12 @@ func ExampleDecodeString() {
// Hello Gopher!
}

func ExampleDecoder_Read() {
func ExampleNewDecoder() {
src := []byte("01001000011001010110110001101100011011110010000001000111011011110111000001101000011001010111001000100001")

buf := bytes.NewBuffer(src)
dec := NewDecoder(buf)

io.Copy(os.Stdout, dec)

// Output:
Expand Down

0 comments on commit 9874839

Please sign in to comment.