Fix typos and build.
This commit is contained in:
parent
7a003f22cd
commit
7f7690323d
@ -37,19 +37,18 @@ var createCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
// Moving to use MyCompany/new-project as way to specify organization instead of
|
// Moving to use MyCompany/new-project as way to specify organization instead of
|
||||||
// --org flag.
|
// --org flag.
|
||||||
fullRepoName := args
|
if len(args) == 1 {
|
||||||
if len(fullRepoName) == 1 {
|
splitter := strings.Split(args[0], "/")
|
||||||
splitter := strings.Split(fullRepoName, "/")
|
|
||||||
if len(splitter) == 2 {
|
if len(splitter) == 2 {
|
||||||
orgName = splitter[0]
|
orgName = splitter[0]
|
||||||
repoName = splitter[1]
|
repoName = splitter[1]
|
||||||
} else {
|
} else {
|
||||||
repoName = fullRepoName
|
repoName = args[0]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// we got MyCompany new-project
|
// we got MyCompany new-project
|
||||||
orgName = fullRepoName[0]
|
orgName = args[0]
|
||||||
repoName = fullRepoName[1] // this'll take 'cactus' of MyCompany cactus spikey --private; spikey will be igored... FIXME?
|
repoName = args[1] // this'll take 'cactus' of MyCompany cactus spikey --private; spikey will be igored... FIXME?
|
||||||
}
|
}
|
||||||
|
|
||||||
createRepoOpts := gogs.CreateRepoOption{
|
createRepoOpts := gogs.CreateRepoOption{
|
||||||
|
Loading…
Reference in New Issue
Block a user