{"modulePath":"github.com/jeromer/syslogparser","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parsercommon\n\n## Constants\n\n```go\nconst (\n\tNO_VERSION = -1\n)\n```\n\n## Variables\n\n```go\nvar (\n\tErrEOL     = \u0026ParserError{\"End of log line\"}\n\tErrNoSpace = \u0026ParserError{\"No space found\"}\n\n\tErrPriorityNoStart  = \u0026ParserError{\"No start char found for priority\"}\n\tErrPriorityEmpty    = \u0026ParserError{\"Priority field empty\"}\n\tErrPriorityNoEnd    = \u0026ParserError{\"No end char found for priority\"}\n\tErrPriorityTooShort = \u0026ParserError{\"Priority field too short\"}\n\tErrPriorityTooLong  = \u0026ParserError{\"Priority field too long\"}\n\tErrPriorityNonDigit = \u0026ParserError{\"Non digit found in priority\"}\n\n\tErrVersionNotFound = \u0026ParserError{\"Can not find version\"}\n\n\tErrTimestampUnknownFormat = \u0026ParserError{\"Timestamp format unknown\"}\n\n\tErrHostnameNotFound = \u0026ParserError{\"Hostname not found\"}\n)\n```\n\n## Functions\n\n```go\nfunc FindNextSpace(buff []byte, from int, l int) (int, error)\n```\n\n```go\nfunc IsDigit(c byte) bool\n```\n\n```go\nfunc Parse2Digits(buff []byte, cursor *int, l int, min int, max int, e error) (int, error)\n```\n\n```go\nfunc ParseHostname(buff []byte, cursor *int, l int) (string, error)\n```\n\n```go\nfunc ParseVersion(buff []byte, cursor *int, l int) (int, error)\n```\n[https://tools.ietf.org/html/rfc5424#section-6.2.2](https://tools.ietf.org/html/rfc5424#section-6.2.2)\n\n```go\nfunc ShowCursorPos(buff []byte, cursor int)\n```\n\n## Types\n\n```go\ntype Facility struct {\n\tValue int\n}\n```\n\n```go\ntype ParserError struct {\n\tErrorString string\n}\n```\n\n```go\nfunc (err *ParserError) Error() string\n```\n\n```go\ntype Priority struct {\n\tP int\n\tF Facility\n\tS Severity\n}\n```\n\n```go\nfunc NewPriority(p int) *Priority\n```\n\n```go\nfunc ParsePriority(buff []byte, cursor *int, l int) (*Priority, error)\n```\n[https://tools.ietf.org/html/rfc3164#section-4.1](https://tools.ietf.org/html/rfc3164#section-4.1)\n\n```go\ntype Severity struct {\n\tValue int\n}\n```\n\n","path":"github.com/jeromer/syslogparser/parsercommon","name":"parsercommon","synopsis":"","isRedistributable":true}
