Skip to content

Commit f84e1f8

Browse files
author
Aaron Schlesinger
committed
fix(pkg/gitreceive/storage/endpoint.go): make endpoint exported
so it can be used by the gitreceive hook
1 parent 84423c9 commit f84e1f8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

pkg/gitreceive/storage/endpoint.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ func stripScheme(str string) string {
3333
return str
3434
}
3535

36-
type endpoint struct {
37-
urlStr string
38-
secure bool
36+
type Endpoint struct {
37+
URLStr string
38+
Secure bool
3939
}
4040

41-
func getEndpoint(env sys.Env) (*endpoint, error) {
41+
func getEndpoint(env sys.Env) (*Endpoint, error) {
4242
mHost := env.Get(minioHostEnvVar)
4343
mPort := env.Get(minioPortEnvVar)
4444
S3EP := env.Get(outsideStorageEndpoint)
4545
if S3EP != "" {
46-
return &endpoint{urlStr: stripScheme(S3EP), secure: true}, nil
46+
return &Endpoint{URLStr: stripScheme(S3EP), Secure: true}, nil
4747
} else if mHost != "" && mPort != "" {
48-
return &endpoint{urlStr: fmt.Sprintf("%s:%s", mHost, mPort), secure: false}, nil
48+
return &Endpoint{URLStr: fmt.Sprintf("%s:%s", mHost, mPort), Secure: false}, nil
4949
} else {
5050
return nil, errNoStorageConfig
5151
}

0 commit comments

Comments
 (0)