Package eol implements tools for working with end-of-line, for the Go programming language.
Go to file
Charles Iliya Krempeaux 6080dd1015 eol.IsEOL 2024-03-25 23:40:55 -07:00
cr string constnats 2024-02-18 09:14:01 -08:00
crlf string constnats 2024-02-18 09:15:13 -08:00
ff form-feed, etc 2024-03-25 23:24:08 -07:00
lf string constnats 2024-02-18 09:14:01 -08:00
lfcr lf cr 2024-02-18 09:55:26 -08:00
ls string constnats 2024-02-18 09:14:01 -08:00
nel string constnats 2024-02-18 09:14:01 -08:00
ps paragraph-separator 2024-03-25 23:36:06 -07:00
vt vertical-tab 2024-03-25 23:05:26 -07:00
LICENSE README.md LICENSE updates 2024-03-25 23:38:16 -07:00
README.md README.md LICENSE updates 2024-03-25 23:38:16 -07:00
circumstance.go paragraph-separator 2024-03-25 23:36:06 -07: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
iseol.go eol.IsEOL 2024-03-25 23:40:55 -07:00
notfound.go paragraph-separator 2024-03-25 23:36:06 -07: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 refactor constants 2024-02-18 09:27:47 -08:00
readcr_test.go initial commits 2023-11-28 08:07:35 -08:00
readcrlf.go refactor constants 2024-02-18 09:27:47 -08:00
readcrlf_test.go initial commits 2023-11-28 08:09:43 -08:00
readeol.go paragraph-separator 2024-03-25 23:36:06 -07:00
readeol_test.go paragraph-separator 2024-03-25 23:36:06 -07:00
readff.go form-feed, etc 2024-03-25 23:24:08 -07:00
readff_test.go form-feed, etc 2024-03-25 23:24:08 -07:00
readlf.go refactor constants 2024-02-18 09:27:47 -08:00
readlf_test.go initial commits 2023-11-28 08:08:06 -08:00
readlfcr.go lf cr 2024-02-18 10:07:49 -08:00
readlfcr_test.go lf cr 2024-02-18 10:07:49 -08:00
readls.go refactor constants 2024-02-18 09:27:47 -08:00
readls_test.go initial commits 2023-11-28 08:08:55 -08:00
readnel.go refactor constants 2024-02-18 09:27:47 -08:00
readnel_test.go initial commits 2023-11-28 08:09:19 -08:00
readps.go paragraph-separator 2024-03-25 23:36:06 -07:00
readps_test.go paragraph-separator 2024-03-25 23:36:06 -07:00
readthiseol.go refactor constants 2024-02-18 09:27:47 -08:00
readthiseol_test.go initial commits 2023-11-29 10:18:09 -08:00
readthisrune.go initial commits 2023-11-28 08:05:15 -08:00
readthisrune_test.go refactor constants 2024-02-18 09:27:47 -08:00
readvt.go form-feed, etc 2024-03-25 23:24:08 -07:00
readvt_test.go vertical-tab 2024-03-25 23:05:26 -07:00
unrecognizedeol.go initial commits 2023-11-29 10:18:09 -08:00

README.md

go-eol

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

The end-of-line sequences it supports is:

  • "\n" // line-feed (LF)
  • "\n\r" // line-feed (LF), carriage-return (CR)
  • "\v" // vertical-tab (VT)
  • "\f" // form-feed (FF)
  • "\r" // carriage-return (CR)
  • "\r\n" // carriage-return (CR), line-feed (LF)
  • "\u0085" // next-line (NEL)
  • "\u2028" // line-separator (LS)
  • "\u2029" // paragraph-separator (PS)

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