mirror of
https://github.com/number571/go-peer.git
synced 2026-09-12 19:50:00 +05:00
21 lines
409 B
Go
21 lines
409 B
Go
package state
|
|
|
|
const (
|
|
errPrefix = "pkg/state = "
|
|
)
|
|
|
|
type SStateError struct {
|
|
str string
|
|
}
|
|
|
|
func (err *SStateError) Error() string {
|
|
return errPrefix + err.str
|
|
}
|
|
|
|
var (
|
|
ErrStateEnabled = &SStateError{"state already enabled"}
|
|
ErrStateDisabled = &SStateError{"state already disabled"}
|
|
ErrFuncEnable = &SStateError{"enable state function"}
|
|
ErrFuncDisable = &SStateError{"disable state function"}
|
|
)
|