Help us shape the future of Go! Take the 2026 Go Developer Survey

parse

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CommitBytes is the string "COMMIT" in bytes array
	CommitBytes = []byte("COMMIT")
	// SpaceBytes is white space in bytes array
	SpaceBytes = []byte(" ")
	// MinOptionLength indicates the minimum length of an option
	MinOptionLength = 2
)

Functions

func Iptables

func Iptables(tableName string) (*NPMIPtable.Table, error)

Iptables creates a Go object from specified iptable by calling iptables-save within node.

func IptablesFile

func IptablesFile(tableName, iptableSaveFile string) (*NPMIPtable.Table, error)

IptablesFile creates a Go object from specified iptable by reading from an iptables-save file.

func Line

func Line(readIndex int, iptableBuffer []byte) ([]byte, int)

Line parses the line starting from the given readIndex of the iptableBuffer. Returns a slice of line starting from given read index and the next index to read from.

Types

type IPTablesParser

type IPTablesParser struct {
	IOShim *common.IOShim
}

func (*IPTablesParser) Iptables

func (i *IPTablesParser) Iptables(tableName string) (*NPMIPtable.Table, error)

Iptables creates a Go object from specified iptable by calling iptables-save within node.

Jump to

Keyboard shortcuts

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