Skip to content
Snippets Groups Projects
Commit e4eb1f6d authored by Joe Zou's avatar Joe Zou Committed by 邹毅贤
Browse files

Merge pull request #944 from georgehao/develop

fix:  URL.String() data race panic
parent a347a049
No related branches found
No related tags found
No related merge requests found
......@@ -317,6 +317,8 @@ func isMatchCategory(category1 string, category2 string) bool {
}
func (c *URL) String() string {
c.paramsLock.Lock()
defer c.paramsLock.Unlock()
var buf strings.Builder
if len(c.Username) == 0 && len(c.Password) == 0 {
buf.WriteString(fmt.Sprintf("%s://%s:%s%s?", c.Protocol, c.Ip, c.Port, c.Path))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment