Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
remove some print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm committed May 9, 2020
1 parent d1d895e commit fd27fb9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 25 deletions.
16 changes: 4 additions & 12 deletions .hof/Cli/cmd/mvs/ga/ga.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ func SendGaEvent(action, label string, value int) {
cid = "unknown"
}

fmt.Println("CID:", cid)

cfg := yagu.GaConfig{
TID: "UA-103579574-5",
CID: cid,
Expand Down Expand Up @@ -53,26 +51,20 @@ func readGaId() (string, error) {

_, err := os.Lstat(fn)
if err != nil {
// make sure we check err for something actually bad
if _, ok := err.(*os.PathError); !ok && err.Error() != "file does not exist" {
// return "", err
}
// file does not exist
// file does not exist, probably...
return writeGaId()
}

content, err := ioutil.ReadFile(fn)
if err != nil {
fmt.Println("ERROR:", err)
return writeGaId()
// return "", err
}

return string(content), nil
}

func writeGaId() (string, error) {
fmt.Println("writeGaId")
// fmt.Println("writeGaId")
ucd := yagu.UserHomeDir()

dir := filepath.Join(ucd, ".hof")
Expand All @@ -81,7 +73,7 @@ func writeGaId() (string, error) {
return "", err
}

fmt.Println("Mkdir:", dir)
// fmt.Println("Mkdir:", dir)

fn := filepath.Join(dir, ".uuid")

Expand All @@ -90,7 +82,7 @@ func writeGaId() (string, error) {
return id.String(), err
}

fmt.Println("writeGaId: ", id.String())
// fmt.Println("writeGaId: ", id.String())

err = ioutil.WriteFile(fn, []byte(id.String()), 0644)
if err != nil {
Expand Down
16 changes: 4 additions & 12 deletions cmd/mvs/ga/ga.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ func SendGaEvent(action, label string, value int) {
cid = "unknown"
}

fmt.Println("CID:", cid)

cfg := yagu.GaConfig{
TID: "UA-103579574-5",
CID: cid,
Expand Down Expand Up @@ -53,26 +51,20 @@ func readGaId() (string, error) {

_, err := os.Lstat(fn)
if err != nil {
// make sure we check err for something actually bad
if _, ok := err.(*os.PathError); !ok && err.Error() != "file does not exist" {
// return "", err
}
// file does not exist
// file does not exist, probably...
return writeGaId()
}

content, err := ioutil.ReadFile(fn)
if err != nil {
fmt.Println("ERROR:", err)
return writeGaId()
// return "", err
}

return string(content), nil
}

func writeGaId() (string, error) {
fmt.Println("writeGaId")
// fmt.Println("writeGaId")
ucd := yagu.UserHomeDir()

dir := filepath.Join(ucd, ".hof")
Expand All @@ -81,7 +73,7 @@ func writeGaId() (string, error) {
return "", err
}

fmt.Println("Mkdir:", dir)
// fmt.Println("Mkdir:", dir)

fn := filepath.Join(dir, ".uuid")

Expand All @@ -90,7 +82,7 @@ func writeGaId() (string, error) {
return id.String(), err
}

fmt.Println("writeGaId: ", id.String())
// fmt.Println("writeGaId: ", id.String())

err = ioutil.WriteFile(fn, []byte(id.String()), 0644)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cue.mods
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module github.com/hofstadter-io/mvs
cue master

require (
github.com/hofstadter-io/hofmod-cli v0.5.1
github.com/hofstadter-io/hofmod-cli v0.5.2
)
2 changes: 2 additions & 0 deletions cue.sums
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ github.com/hofstadter-io/hofmod-cli v0.5.0 h1:hZT2BUWJftP9jq32bcOElXg1N9oXEFJCK9
github.com/hofstadter-io/hofmod-cli v0.5.0/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU=
github.com/hofstadter-io/hofmod-cli v0.5.1 h1:a8Zworm73OyAUxtVPEzibspP5kImka/3D+CwHQ9cz+E=
github.com/hofstadter-io/hofmod-cli v0.5.1/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU=
github.com/hofstadter-io/hofmod-cli v0.5.2 h1:LAtrhhLOnuPaAS/P+5E+9Rgq0XmcpRBwuS4iisKZQ1M=
github.com/hofstadter-io/hofmod-cli v0.5.2/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU=

0 comments on commit fd27fb9

Please sign in to comment.