aini

package module
v0.0.0-...-7a3e8c2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: MIT Imports: 9 Imported by: 0

README

aini

Simple library for parsing Ansible host files (ini) in Go.

Installing

Use the 'go get' command to download the package.

go get github.com/outtenr/aini

Then import the package into your project.

import "github.com/outtenr/aini"

TODO

  • expanding host names
  • :vars and :children in the group
  • additional ssh options

Credits

To the Ansible team for writing easy to follow code.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	Name string
	Port int
}

type Hosts

type Hosts struct {
	Groups map[string][]Host
	// contains filtered or unexported fields
}

func NewFile

func NewFile(f string) (*Hosts, error)

func NewParser

func NewParser(r io.Reader) (*Hosts, error)

func (*Hosts) Match

func (h *Hosts) Match(m string) []Host