Package eol implements tools for working with end-of-line, for the Go programming language.
Go to file
Charles Iliya Krempeaux 81ff90ccd8 initial commits 2023-11-28 08:07:35 -08:00
LICENSE initial commits 2023-11-27 06:46:40 -08:00
README.md initial commits 2023-11-27 11:33:48 -08:00
circumstance.go initial commits 2023-11-28 07:54:28 -08:00
consts.go initial commits 2023-11-27 11:20:41 -08:00
errors.go initial commits 2023-11-28 06:26:36 -08:00
go.mod initial commits 2023-11-28 08:03:37 -08:00
go.sum initial commits 2023-11-28 08:03:37 -08:00
notfound.go initial commits 2023-11-28 08:04:21 -08:00
problemreadingrune.go initial commits 2023-11-28 08:04:21 -08:00
problemunreadingrune.go initial commits 2023-11-28 08:04:21 -08:00
readcr.go initial commits 2023-11-28 08:07:35 -08:00
readcr_test.go initial commits 2023-11-28 08:07:35 -08:00
readeol.go initial commits 2023-11-27 11:20:41 -08:00
readeol_test.go initial commits 2023-11-27 11:20:41 -08:00
readlf.go initial commits 2023-11-28 06:26:36 -08:00
readlf_test.go initial commits 2023-11-28 06:26:36 -08:00
readls.go initial commits 2023-11-28 06:26:36 -08:00
readls_test.go initial commits 2023-11-28 06:26:36 -08:00
readnel.go initial commits 2023-11-28 06:26:36 -08:00
readnel_test.go initial commits 2023-11-28 06:26:36 -08:00
readthisrune.go initial commits 2023-11-28 08:05:15 -08:00
readthisrune_test.go initial commits 2023-11-28 08:05:15 -08:00

README.md

go-eol

Package eol implements tools for working with end-of-line, for the Go programming language.

The end-of-line sequences it supports is:

  • "\n" // line-feed (LF)
  • "\r" // carriage-return (CR)
  • "\r\n" // carriage-return (CR), line-feed (LF)
  • "\u0085" // next-line (NEL)
  • "\u2028" // line-separator (LS)

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/sourcecode.social/reiver/go-eol

GoDoc

Example

Here is an example:


import "sourcecode.social/reiver/go-eol"

// ...

eodofline, size, err := eol.ReadEOL(runereader)
if nil != err {
	return err
}

Import

To import package eol use import code like the follownig:

import "sourcecode.social/reiver/go-eol"

Installation

To install package eol do the following:

GOPROXY=direct go get https://sourcecode.social/reiver/go-eol

Author

Package eol was written by Charles Iliya Krempeaux