os package with reading an open file and error log

the os package import a few other packages. file, err := os.Open(“file.go”) // For read access. if err != nil { log.Fatal(err) } Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY. If there is an error, it… Continue reading os package with reading an open file and error log