1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
# Go bindings for Augeas
This package provides Go bindings for [Augeas](http://augeas.net/),
the configuration editing tool.
## Installation
```sh
go get honnef.co/go/augeas
```
## Documentation
Documentation can be found at
[godoc.org](http://godoc.org/honnef.co/go/augeas).
## Examples
### Simple example
```go
package main
import (
"honnef.co/go/augeas"
"fmt"
)
func main() {
ag, err := augeas.New("/", "", augeas.None)
if err != nil {
panic(err)
}
// There is also Augeas.Version(), but we're demonstrating Get
// here.
version, err := ag.Get("/augeas/version")
fmt.Println(version, err)
}
```
### Extended example
An extended example that fetches all host entries from /etc/hosts can
be found [in the playground](http://play.golang.org/p/aDjm4RWBvP).
|