From 97238f49323bb7d78bf0a2b6d502da17dc443cb3 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Tue, 28 Nov 2023 08:14:55 -0800 Subject: [PATCH] initial commits --- readeol.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/readeol.go b/readeol.go index f2529fc..c3d833d 100644 --- a/readeol.go +++ b/readeol.go @@ -6,7 +6,7 @@ import ( "sourcecode.social/reiver/go-opt" ) -// ReadEOL tries to read and end-of-line character. +// ReadEOL tries to read an end-of-line sequence. // // The end-of-line sequences it supports are: // @@ -17,6 +17,10 @@ import ( // line-separator (LS) (U+2028) // // If successful, ReadEOL return the end-of-line sequence it found and the number-of-bytes read (to read in end-of-line sequence it found). +// +// Example usage: +/// +// eolSequence, size: err := eol.ReadEOL(runescanner) func ReadEOL(runescanner io.RuneScanner) (endofline string, size int, err error) { if nil == runescanner { return "", 0, errNilRuneScanner