all: gofmt
Formatted by the great automatic gofmter, <3 fmtatt.
This commit is contained in:
parent
5c53cc8e17
commit
e6c1f2b577
@ -9,18 +9,19 @@ import (
|
||||
)
|
||||
|
||||
// Flags.
|
||||
var migrateMirror bool
|
||||
var migrateMirror bool
|
||||
var migratePrivate bool
|
||||
|
||||
func unusableUsage() {
|
||||
fmt.Println("Please argue me <user|organization>/<name-of-new-repo> <http://url.of.cloneable.repo.git>")
|
||||
return
|
||||
}
|
||||
|
||||
// migrateCmd represents the migrate command
|
||||
var migrateCmd = &cobra.Command{
|
||||
Aliases: []string{"m"},
|
||||
Use: "migrate, m",
|
||||
Short: "Migrate a repository from a given remote source.",
|
||||
Use: "migrate, m",
|
||||
Short: "Migrate a repository from a given remote source.",
|
||||
Long: `Usage:
|
||||
|
||||
$ gogs repo migrate irstacks/copycat https://github.com/gogits/gogs.git
|
||||
@ -73,7 +74,7 @@ Options:
|
||||
}
|
||||
|
||||
opts.CloneAddr = migrateUrl
|
||||
opts.RepoName = ownernameReponame[1]
|
||||
opts.RepoName = ownernameReponame[1]
|
||||
opts.Mirror = migrateMirror
|
||||
opts.Private = migratePrivate
|
||||
|
||||
@ -84,7 +85,7 @@ Options:
|
||||
}
|
||||
|
||||
fmt.Println("Repo migrated! Woohoo!")
|
||||
printRepo(repo)
|
||||
printRepo(repo)
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ func initConfig() {
|
||||
fmt.Println("No configuration file found. Is there for sure one at $HOME/.go-gogs-cli.yaml?")
|
||||
}
|
||||
|
||||
// These should override any configFile or env vars.
|
||||
// These should override any configFile or env vars.
|
||||
if tokenArg != "" {
|
||||
viper.Set("token", tokenArg)
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
@ -24,7 +23,6 @@ func getUserByName(userName string) (user *gogs.User, err error) {
|
||||
return user, err
|
||||
}
|
||||
|
||||
|
||||
// This sucker is really annoying. Gogs Client says that search is a thing.
|
||||
// And it is, it does work.
|
||||
// But... I can't find it in the package. It's just not there. I've looked.
|
||||
|
Loading…
Reference in New Issue
Block a user