2023-10-31 15:32:29 +00:00
package cwhub
import (
"errors"
2023-11-08 12:21:59 +00:00
"fmt"
2023-10-31 15:32:29 +00:00
)
var (
// ErrNilRemoteHub is returned when the remote hub configuration is not provided to the NewHub constructor.
ErrNilRemoteHub = errors . New ( "remote hub configuration is not provided. Please report this issue to the developers" )
)
2023-11-08 12:21:59 +00:00
2023-11-21 16:43:10 +00:00
// IndexNotFoundError is returned when the remote hub index is not found.
2023-11-08 12:21:59 +00:00
type IndexNotFoundError struct {
URL string
Branch string
}
func ( e IndexNotFoundError ) Error ( ) string {
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 )
}