msg

package
v0.0.0-...-f1d3745 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Simple parser to read text files that contain entries of the format (used by snort message maps):

# comment line
field_1 || .. || field_n

Allows for empty lines and lines the begin with # for comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line []string

Line of the file represented as a list of fields

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Wrap up existing bufio reader

func NewReader

func NewReader(rd io.Reader) *Reader

NewReader wraps bufio reader NewReader

func (*Reader) ReadNext

func (r *Reader) ReadNext() (Line, error)

Read structured line to parse next line available into Line structure.

Returns slice of fields if line is not empty and not comment, otherwise nil is returned (e.g. in the case of eof)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL