Created
October 17, 2016 08:49
-
-
Save scorredoira/0a311c1d5c3978a3dfbff30ba8355352 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
f, err := os.Open("access.log") | |
if err != nil { | |
panic(err) | |
} | |
defer f.Close() | |
sc, err := files.NewBackScanner(f) | |
if err != nil { | |
panic(err) | |
} | |
for i := 0; i < 50 && sc.Scan(); i++ { | |
fmt.Println(sc.Text()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment