MCPcopy
hub / github.com/mzz2017/gg / ExportToURL

Method ExportToURL

dialer/socks/socks.go:131–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129}
130
131func (s *Socks) ExportToURL() string {
132 var user *url.Userinfo
133 if s.Password != "" {
134 user = url.UserPassword(s.Username, s.Password)
135 } else {
136 user = url.User(s.Username)
137 }
138 u := url.URL{
139 Scheme: s.Protocol,
140 User: user,
141 Host: net.JoinHostPort(s.Server, strconv.Itoa(s.Port)),
142 Fragment: s.Name,
143 }
144 return u.String()
145}

Callers 1

DialerMethod · 0.95

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected