glide setup and dependencies addition

This commit is contained in:
Steve Brunton
2017-08-27 23:27:11 -04:00
commit b0e0be5688
74 changed files with 11533 additions and 0 deletions

35
vendor/gopkg.in/routeros.v2/error.go generated vendored Normal file
View File

@@ -0,0 +1,35 @@
package routeros
import (
"errors"
"gopkg.in/routeros.v2/proto"
)
var (
errAlreadyAsync = errors.New("Async() has already been called")
errAsyncLoopEnded = errors.New("Async() loop has ended - probably read error")
)
// UnknownReplyError records the sentence whose Word is unknown.
type UnknownReplyError struct {
Sentence *proto.Sentence
}
func (err *UnknownReplyError) Error() string {
return "unknown RouterOS reply word: " + err.Sentence.Word
}
// DeviceError records the sentence containing the error received from the device.
// The sentence may have Word !trap or !fatal.
type DeviceError struct {
Sentence *proto.Sentence
}
func (err *DeviceError) Error() string {
m := err.Sentence.Map["message"]
if m == "" {
m = "unknown error: " + err.Sentence.String()
}
return "from RouterOS device: " + m
}