Browse Source

renamed github flag to username based on feedback

master
alexkappa 9 years ago
parent
commit
44d1b902ee
1 changed files with 4 additions and 5 deletions
  1. +4
    -5
      main.go

+ 4
- 5
main.go View File

@@ -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.


Loading…
Cancel
Save