GopacheConfig

package module
v0.0.0-...-969f071 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 6 Imported by: 0

README

Gopache Config

This is a fork of https://github.com/RobertYost/GopacheConfig/tree/master Which is a very simple parser for Apache HTTP Server configuration files. It parses an apache .conf file into an n-ary tree.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigNode

type ConfigNode struct {
	Name     string
	Content  string
	Parent   *ConfigNode
	Children []*ConfigNode
}

ConfigNode is a recursively defined n-ary tree

func Parse

func Parse(r io.Reader) (*ConfigNode, error)

Parse reads a data source and converts the apache config file into a tree-based struct

func (*ConfigNode) Find

func (c *ConfigNode) Find(name string) ([]*ConfigNode, error)

Find finds all elements in the subtree c where node.Name == name

func (*ConfigNode) FindOne

func (c *ConfigNode) FindOne(name string) (*ConfigNode, error)

FindOne finds the first element in the subtree c where node.Name == name

func (*ConfigNode) String

func (c *ConfigNode) String(level int) string

String prints out the contents of a Config node in an easy to read format

Jump to

Keyboard shortcuts

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