Documentation ¶
Overview ¶
Dup3 prints the count and text of lines that appear more than once in the named input files. It reads in entire file at once ("slurp" mode). Adapted from github.com/adonovan/gopl.io/tree/master/ch1/dup3.
os.ReadFile (dup3) and bufio.Scanner (dup2) use the Read and Write methods of *os.File under covers.
Level: beginner Topics: io, maps, os.ReadFile, strings.Split
Click to show internal directories.
Click to hide internal directories.