package main import ( "bufio" "fmt" "math" "os" ) var scanner *bufio.Scanner func main() { scanner = bufio.NewScanner(os.Stdin) scanner.Buffer([]byte{}, math.MaxInt64) scanner.Split(bufio.ScanBytes) for scanner.Scan() { fmt.Printf("%X\n", scanner.Text()) } }