Skip to content

Commit

Permalink
Update qiniu.go
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz authored Mar 7, 2024
1 parent 6af4e10 commit 23b8aa0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiniu/qiniu.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func New(config *Config) (*Client, error) {
if len(config.Endpoint) == 0 {
return nil, fmt.Errorf("endpoint must be provided.")
}
// 检查Endpoint是否以http://或https://开头

if !strings.HasPrefix(config.Endpoint, "http://") && !strings.HasPrefix(config.Endpoint, "https://") {
return nil, fmt.Errorf("endpoint must start with http:// or https://")
}
Expand Down

0 comments on commit 23b8aa0

Please sign in to comment.