Skip to content

Commit

Permalink
docs: add docs in TrimHTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
nesangcode authored Apr 25, 2024
1 parent 24a5601 commit 63a0dbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/storage/minio/minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ func NewStorage(conf *config.MinioConfig, timeout time.Duration) (storage.Backen
}

// TrimHTTP trims "http://" or "https://" prefix from input string.
// Minio doesn't need to specify protocol in the URL so it should be trimmed. 
// Related issue: https://github.com/gomods/athens/issues/1938#issuecomment-2067590653
func TrimHTTP(s string) string {
s = strings.TrimPrefix(s, "http://")
s = strings.TrimPrefix(s, "https://")
Expand Down

0 comments on commit 63a0dbc

Please sign in to comment.