package mainimport ( "os" "fmt" "bufio")func main(){ fileName :=os.Args[1] file,err := os.Open(fileName) if err != nil{ return } defer file.Close() fd:=bufio.NewReader(file) count :=0 for { _,err := fd.ReadString('\n') if err!= nil{ break } count++ } fmt.Println(count)}