improving client/server info command

This commit is contained in:
2020-06-07 18:31:01 -04:00
parent dd3fd7c4ae
commit 6d738b138d
12 changed files with 72 additions and 31 deletions

View File

@@ -4,10 +4,11 @@ import (
"fmt"
"log"
"os"
"path/filepath"
)
// InitializeRepo creates the repo directory and a new config file
func InitializeRepo() {
func InitializeRepo() string {
cwd, err := os.Getwd()
if err != nil {
log.Fatal("unable to get current working directory.. permissions issue?")
@@ -17,4 +18,7 @@ func InitializeRepo() {
if err != nil {
fmt.Println(".gvc directory already exists, but no config file... continuing")
}
repoName := filepath.Base(cwd)
fmt.Println("Adding new repo with name: ", repoName)
return repoName
}