Created
September 13, 2017 19:42
-
-
Save vladimirvivien/d4bd2034037c1f057504398bf626f0c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
reader := strings.NewReader("Clear is better than clever") | |
p := make([]byte, 4) | |
for { | |
n, err := reader.Read(p) | |
if err == io.EOF { | |
break | |
} | |
fmt.Println(string(p[:n])) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment