github.com/crowdsecurity/crowdsec@v1.6.1/pkg/cwhub/errors.go (about) 1 package cwhub 2 3 import ( 4 "errors" 5 "fmt" 6 ) 7 8 var ( 9 // ErrNilRemoteHub is returned when trying to download with a local-only configuration. 10 ErrNilRemoteHub = errors.New("remote hub configuration is not provided. Please report this issue to the developers") 11 ) 12 13 // IndexNotFoundError is returned when the remote hub index is not found. 14 type IndexNotFoundError struct { 15 URL string 16 Branch string 17 } 18 19 func (e IndexNotFoundError) Error() string { 20 return fmt.Sprintf("index not found at %s, branch '%s'. Please check the .cscli.hub_branch value if you specified it in config.yaml, or use 'master' if not sure", e.URL, e.Branch) 21 }