aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/url.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/config/url.go')
-rw-r--r--pkg/config/url.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/config/url.go b/pkg/config/url.go
index 9621672..39cce16 100644
--- a/pkg/config/url.go
+++ b/pkg/config/url.go
@@ -64,12 +64,18 @@ func (u *Url) UnmarshalYAML(value *yaml.Node) (err error) {
}
func (u *Url) String() string {
+ scheme := u.Scheme + "://"
+
var pwd string
if u.Password != "" {
pwd = ":******"
}
+ var delim string
+ if pwd != "" || u.User != "" {
+ delim = "@"
+ }
- return fmt.Sprintf("%s://%s%s@%s%s", u.Scheme, u.User, pwd, u.HostPort(), u.Root)
+ return scheme + u.User + pwd + delim + u.HostPort() + u.Root
}
func (u *Url) HostPort() string {
elognecoro1-1/+2 2007-03-31Some small changes for etcproposals 1.1necoro1-2/+2 2007-03-31Some small changes for etcproposals 1.1necoro2-3/+3 2007-03-31Some small changes for etcproposals 1.1necoro1-6/+13 2007-03-31Allowed Plugins to have a menunecoro7-201/+315 2007-03-15Added etc-proposals pluginnecoro7-28/+121 2007-03-10Added USE_EXPAND-supportnecoro5-11/+63 2007-03-10Added plugin-data to about-dialognecoro3-197/+264