glide setup and dependencies addition
This commit is contained in:
26
vendor/gopkg.in/routeros.v2/proto/sentence.go
generated
vendored
Normal file
26
vendor/gopkg.in/routeros.v2/proto/sentence.go
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package proto
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Sentence is a line read from a RouterOS device.
|
||||
type Sentence struct {
|
||||
// Word that begins with !
|
||||
Word string
|
||||
Tag string
|
||||
List []Pair
|
||||
Map map[string]string
|
||||
}
|
||||
|
||||
type Pair struct {
|
||||
Key, Value string
|
||||
}
|
||||
|
||||
func NewSentence() *Sentence {
|
||||
return &Sentence{
|
||||
Map: make(map[string]string),
|
||||
}
|
||||
}
|
||||
|
||||
func (sen *Sentence) String() string {
|
||||
return fmt.Sprintf("%s @%s %#q", sen.Word, sen.Tag, sen.List)
|
||||
}
|
||||
Reference in New Issue
Block a user