Fix up Formatting

This commit is contained in:
Justin Hammond 2021-10-07 14:30:02 +08:00
parent fdbc9af83c
commit 43a1914da8
2 changed files with 7 additions and 7 deletions

View file

@ -10,10 +10,10 @@ import (
// Config contains all configuration necessary to connect to a REST server.
type Config struct {
Server *url.URL
Credential string `option:"credentialfile" help:"Path to the NatsIO Credential File"`
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
Repo string
Server *url.URL
Credential string `option:"credentialfile" help:"Path to the NatsIO Credential File"`
Connections uint `option:"connections" help:"set a limit for the number of concurrent connections (default: 5)"`
Repo string
}
func init() {
@ -46,11 +46,11 @@ func ParseConfig(s string) (interface{}, error) {
repo = cfg.Server.Path[1:]
}
if repo[len(repo)-1] == '/' {
repo = repo[0:len(repo)-1]
repo = repo[0 : len(repo)-1]
}
// replace any further slashes with . to specify a nested queue
repo = strings.Replace(repo, "/", ".", -1)
cfg.Repo = repo
return cfg, nil
}
}

View file

@ -11,9 +11,9 @@ import (
"path/filepath"
"time"
"github.com/Fishwaldo/restic-nats-server/protocol"
"github.com/nats-io/nats.go"
"github.com/restic/restic/internal/backend"
"github.com/Fishwaldo/restic-nats-server/protocol"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/restic"