cli/pkg/cmd/attestation/auth/host.go
Kynan Ware 8f7e98c6f6 Add godoc comments to exported symbols in pkg/cmd/attestation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-04 15:53:47 -07:00

18 lines
514 B
Go

package auth
import (
"errors"
ghauth "github.com/cli/go-gh/v2/pkg/auth"
)
// ErrUnsupportedHost is returned when the host is not supported for attestation operations.
var ErrUnsupportedHost = errors.New("An unsupported host was detected. Note that gh attestation does not currently support GHES")
// IsHostSupported returns an error if the given host is an unsupported enterprise server.
func IsHostSupported(host string) error {
if ghauth.IsEnterprise(host) {
return ErrUnsupportedHost
}
return nil
}