func IsNotExist(err error) bool {
	err2, ok := err.(*Error)
	return ok && err2.Code == -1 && strings.HasPrefix(err2.Msg, "No such file:")
}
IsNotExist returns true if err represents a failure due to a non-existing rrd, false otherwise.
package rrd
import (
	"errors"
	"fmt"
	"strings"
)
var (
	ErrNilOption = errors.New("nil option")
)
type Error struct {
	Code int
	Msg  string
}
func NewError(code int, msg string) *Error {
	return &Error{Code: code, Msg: msg}
}
func (e *Error) Error() string {
	return fmt.Sprintf("%v (%v)", e.Msg, e.Code)
}
func IsExist(err error) bool {
	err2, ok := err.(*Error)
	return ok && err2.Code == -1 && strings.Contains(err2.Msg, "File exists")
}