Source file tour/methods/exercise-rot-reader.go

     1  //go:build nobuild || OMIT
     2  
     3  package main
     4  
     5  import (
     6  	"io"
     7  	"os"
     8  	"strings"
     9  )
    10  
    11  type rot13Reader struct {
    12  	r io.Reader
    13  }
    14  
    15  func main() {
    16  	s := strings.NewReader("Lbh penpxrq gur pbqr!")
    17  	r := rot13Reader{s}
    18  	io.Copy(os.Stdout, &r)
    19  }
    20  

View as plain text