Skip to content

Commit 8d04841

Browse files
committed
Document newly exported functions
1 parent 7b29c8e commit 8d04841

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/auth/auth.go

+4
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,15 @@ func defaultHost(cfg *config.Config) (string, string) {
152152
// TenancyHost is the domain name of a tenancy GitHub instance.
153153
const tenancyHost = "ghe.com"
154154

155+
// IsEnterprise determines if a provided host is a GitHub Enterprise Server instance,
156+
// rather than GitHub.com or a tenancy GitHub instance.
155157
func IsEnterprise(host string) bool {
156158
normalizedHost := normalizeHostname(host)
157159
return normalizedHost != github && normalizedHost != localhost && !IsTenancy(normalizedHost)
158160
}
159161

162+
// IsTenancy determines if a provided host is a tenancy GitHub instance,
163+
// rather than GitHub.com or a GitHub Enterprise Server instance.
160164
func IsTenancy(host string) bool {
161165
normalizedHost := normalizeHostname(host)
162166
return strings.HasSuffix(normalizedHost, "."+tenancyHost)

0 commit comments

Comments
 (0)