diff --git a/main.go b/main.go index d15574a..f1dfb9c 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,7 @@ var httpsFlag = flag.String("https", "", "Serve HTTPS at given address") var certFlag = flag.String("cert", "", "Use the provided TLS certificate") var keyFlag = flag.String("key", "", "Use the provided TLS key") var domainFlag = flag.String("domain", "gopkg.in", "Domain name") -var githubFlag = flag.String("github", "", "Github username") +var userFlag = flag.String("username", "", "Github username") func main() { if err := run(); err != nil { @@ -81,14 +81,13 @@ type Repo struct { // GitHubRoot returns the repository root at GitHub, without a schema. func (repo *Repo) GitHubRoot() string { - if *githubFlag != "" { - return "github.com/" + *githubFlag + "/" + repo.Name + if *userFlag != "" { + return "github.com/" + *userFlag + "/" + repo.Name } if repo.User == "" { return "github.com/go-" + repo.Name + "/" + repo.Name - } else { - return "github.com/" + repo.User + "/" + repo.Name } + return "github.com/" + repo.User + "/" + repo.Name } // GopkgRoot returns the package root at gopkg.in, without a schema.