Golang bufio.Bytes() function example

package bufio

Bytes returns the most recent token generated by a call to Scan.

Golang bufio.Bytes() function usage example

 scanner.Split(bufio.ScanBytes)

 for scanner.Scan() {
 fmt.Println(scanner.Bytes())
 }

  See also : Golang bufio.NewScanner() function example

Advertisement