Skip to content

Commit

Permalink
updating to mods and latest go
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe da Veiga Leprevost committed Apr 4, 2020
1 parent 8b85191 commit 279a547
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 69 deletions.
Binary file added darkest-git
Binary file not shown.
139 changes: 70 additions & 69 deletions darkest-git.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ func downloadFromUrl(url, name string) {

// Write the body to file
_, err = io.Copy(out, resp.Body)
return

return
}
Expand Down Expand Up @@ -260,100 +259,102 @@ func main() {

rand.Seed(time.Now().UnixNano())

// get the file name and build the url path
if strings.Contains(args[1], "config") {
if len(args) > 1 {
// get the file name and build the url path
if strings.Contains(args[1], "config") {

index = rand.Intn(len(quoteConfigAudio))
name = strings.Split(quoteConfigAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteConfigAudio[index])
text = quoteConfigText[index]
index = rand.Intn(len(quoteConfigAudio))
name = strings.Split(quoteConfigAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteConfigAudio[index])
text = quoteConfigText[index]

} else if strings.Contains(args[1], "init") {
} else if strings.Contains(args[1], "init") {

index = rand.Intn(len(quoteInitAudio))
name = strings.Split(quoteInitAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteInitAudio[index])
text = quoteInitText[index]
index = rand.Intn(len(quoteInitAudio))
name = strings.Split(quoteInitAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteInitAudio[index])
text = quoteInitText[index]

} else if strings.Contains(args[1], "add") {
} else if strings.Contains(args[1], "add") {

index = rand.Intn(len(quoteAddAudio))
name = strings.Split(quoteAddAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteAddAudio[index])
text = quoteAddText[index]
index = rand.Intn(len(quoteAddAudio))
name = strings.Split(quoteAddAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteAddAudio[index])
text = quoteAddText[index]

} else if strings.Contains(args[1], "commit") {
} else if strings.Contains(args[1], "commit") {

index = rand.Intn(len(quoteCommitAudio))
name = strings.Split(quoteCommitAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteCommitAudio[index])
text = quoteCommitText[index]
index = rand.Intn(len(quoteCommitAudio))
name = strings.Split(quoteCommitAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteCommitAudio[index])
text = quoteCommitText[index]

} else if strings.Contains(args[1], "rm") {
} else if strings.Contains(args[1], "rm") {

index = rand.Intn(len(quoteRmAudio))
name = strings.Split(quoteRmAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteRmAudio[index])
text = quoteRmText[index]
index = rand.Intn(len(quoteRmAudio))
name = strings.Split(quoteRmAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteRmAudio[index])
text = quoteRmText[index]

} else if strings.Contains(args[1], "log") {
} else if strings.Contains(args[1], "log") {

index = rand.Intn(len(quoteLogAudio))
name = strings.Split(quoteLogAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteLogAudio[index])
text = quoteLogText[index]
index = rand.Intn(len(quoteLogAudio))
name = strings.Split(quoteLogAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteLogAudio[index])
text = quoteLogText[index]

} else if strings.Contains(args[1], "reset") {
} else if strings.Contains(args[1], "reset") {

index = rand.Intn(len(quoteResetAudio))
name = strings.Split(quoteResetAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteResetAudio[index])
text = quoteResetText[index]
index = rand.Intn(len(quoteResetAudio))
name = strings.Split(quoteResetAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteResetAudio[index])
text = quoteResetText[index]

} else if strings.Contains(args[1], "show") {
} else if strings.Contains(args[1], "show") {

index = rand.Intn(len(quoteShowAudio))
name = strings.Split(quoteShowAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteShowAudio[index])
text = quoteShowText[index]
index = rand.Intn(len(quoteShowAudio))
name = strings.Split(quoteShowAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteShowAudio[index])
text = quoteShowText[index]

} else if strings.Contains(args[1], "merge") {
} else if strings.Contains(args[1], "merge") {

index = rand.Intn(len(quoteMergeAudio))
name = strings.Split(quoteMergeAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteMergeAudio[index])
text = quoteMergeText[index]
index = rand.Intn(len(quoteMergeAudio))
name = strings.Split(quoteMergeAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteMergeAudio[index])
text = quoteMergeText[index]

} else if strings.Contains(args[1], "checkout") {
} else if strings.Contains(args[1], "checkout") {

index = rand.Intn(len(quoteCheckoutAudio))
name = strings.Split(quoteCheckoutAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteCheckoutAudio[index])
text = quoteCheckoutText[index]
index = rand.Intn(len(quoteCheckoutAudio))
name = strings.Split(quoteCheckoutAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteCheckoutAudio[index])
text = quoteCheckoutText[index]

} else if strings.Contains(args[1], "stash") {
} else if strings.Contains(args[1], "stash") {

index = rand.Intn(len(quoteStashAudio))
name = strings.Split(quoteStashAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteStashAudio[index])
text = quoteStashText[index]
index = rand.Intn(len(quoteStashAudio))
name = strings.Split(quoteStashAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quoteStashAudio[index])
text = quoteStashText[index]

} else if strings.Contains(args[1], "push") {
} else if strings.Contains(args[1], "push") {

index = rand.Intn(len(quotePushAudio))
name = strings.Split(quotePushAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quotePushAudio[index])
text = quotePushText[index]
index = rand.Intn(len(quotePushAudio))
name = strings.Split(quotePushAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quotePushAudio[index])
text = quotePushText[index]

} else if strings.Contains(args[1], "pull") {
} else if strings.Contains(args[1], "pull") {

index = rand.Intn(len(quotePullAudio))
name = strings.Split(quotePullAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quotePullAudio[index])
text = quotePullText[index]
index = rand.Intn(len(quotePullAudio))
name = strings.Split(quotePullAudio[index], "/")
url = fmt.Sprintf("%s%s", baseURl, quotePullAudio[index])
text = quotePullText[index]

} else {
//os.Exit(1)
} else {
//os.Exit(1)
}
}

// locate the temp folder and build the full qualified name of the audio file
Expand Down
14 changes: 14 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module github/darkest-git

go 1.14

require (
github.com/faiface/beep v1.0.2
github.com/hajimehoshi/oto v0.5.4 // indirect
github.com/jfreymuth/oggvorbis v1.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5 // indirect
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
golang.org/x/mobile v0.0.0-20200329125638-4c31acba0007 // indirect
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d // indirect
)
81 changes: 81 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/faiface/beep v1.0.2 h1:UB5DiRNmA4erfUYnHbgU4UB6DlBOrsdEFRtcc8sCkdQ=
github.com/faiface/beep v1.0.2/go.mod h1:1yLb5yRdHMsovYYWVqYLioXkVuziCSITW1oarTeduQM=
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
github.com/gdamore/tcell v1.1.1/go.mod h1:K1udHkiR3cOtlpKG5tZPD5XxrF7v2y7lDq7Whcj+xkQ=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c h1:16eHWuMGvCjSfgRJKqIzapE78onvvTbdi1rMkU00lZw=
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherwasm v0.1.1/go.mod h1:kx4n9a+MzHH0BJJhvlsQ65hqLFXDO/m256AsaDPQ+/4=
github.com/gopherjs/gopherwasm v1.0.0 h1:32nge/RlujS1Im4HNCJPp0NbBOAeBXFuT1KonUuLl+Y=
github.com/gopherjs/gopherwasm v1.0.0/go.mod h1:SkZ8z7CWBz5VXbhJel8TxCmAcsQqzgWGR/8nMhyhZSI=
github.com/gopherjs/gopherwasm v1.1.0/go.mod h1:SkZ8z7CWBz5VXbhJel8TxCmAcsQqzgWGR/8nMhyhZSI=
github.com/hajimehoshi/go-mp3 v0.1.1/go.mod h1:4i+c5pDNKDrxl1iu9iG90/+fhP37lio6gNhjCx9WBJw=
github.com/hajimehoshi/oto v0.1.1/go.mod h1:hUiLWeBQnbDu4pZsAhOnGqMI1ZGibS6e2qhQdfpwz04=
github.com/hajimehoshi/oto v0.3.1 h1:cpf/uIv4Q0oc5uf9loQn7PIehv+mZerh+0KKma6gzMk=
github.com/hajimehoshi/oto v0.3.1/go.mod h1:e9eTLBB9iZto045HLbzfHJIc+jP3xaKrjZTghvb6fdM=
github.com/hajimehoshi/oto v0.5.4 h1:Dn+WcYeF310xqStKm0tnvoruYUV5Sce8+sfUaIvWGkE=
github.com/hajimehoshi/oto v0.5.4/go.mod h1:0QXGEkbuJRohbJaxr7ZQSxnju7hEhseiPx2hrh6raOI=
github.com/jfreymuth/oggvorbis v1.0.0 h1:aOpiihGrFLXpsh2osOlEvTcg5/aluzGQeC7m3uYWOZ0=
github.com/jfreymuth/oggvorbis v1.0.0/go.mod h1:abe6F9QRjuU9l+2jek3gj46lu40N4qlYxh2grqkLEDM=
github.com/jfreymuth/oggvorbis v1.0.1 h1:NT0eXBgE2WHzu6RT/6zcb2H10Kxj6Fm3PccT0LE6bqw=
github.com/jfreymuth/oggvorbis v1.0.1/go.mod h1:NqS+K+UXKje0FUYUPosyQ+XTVvjmVjps1aEZH1sumIk=
github.com/jfreymuth/vorbis v1.0.0 h1:SmDf783s82lIjGZi8EGUUaS7YxPHgRj4ZXW/h7rUi7U=
github.com/jfreymuth/vorbis v1.0.0/go.mod h1:8zy3lUAm9K/rJJk223RKy6vjCZTWC61NA2QD06bfOE0=
github.com/lucasb-eyer/go-colorful v0.0.0-20181028223441-12d3b2882a08/go.mod h1:NXg0ArsFk0Y01623LgUqoqcouGDB+PwCCQlrwrG6xJ4=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mewkiz/flac v1.0.5/go.mod h1:EHZNU32dMF6alpurYyKHDLYpW1lYpBZ5WrXi/VuNIGs=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20180710024300-14dda7b62fcd h1:nLIcFw7GiqKXUS7HiChg6OAYWgASB2H97dZKd1GhDSs=
golang.org/x/exp v0.0.0-20180710024300-14dda7b62fcd/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5 h1:FR+oGxGfbQu1d+jglI3rCkjAjUnhRSZcUxr+DqlDLNo=
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81 h1:00VmoueYNlNz/aHIilyyQz/MHSqGoWJzpFv/HW8xpzI=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg=
golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/mobile v0.0.0-20180806140643-507816974b79 h1:t2JRgCWkY7Qaa1J2jal+wqC9OjbyHCHwIA9rVlRUSMo=
golang.org/x/mobile v0.0.0-20180806140643-507816974b79/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190415191353-3e0bab5405d6/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mobile v0.0.0-20200329125638-4c31acba0007 h1:JxsyO7zPDWn1rBZW8FV5RFwCKqYeXnyaS/VQPLpXu6I=
golang.org/x/mobile v0.0.0-20200329125638-4c31acba0007/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb h1:pf3XwC90UUdNPYWZdFjhGBE7DUFuK3Ct1zWmZ65QN30=
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0/go.mod h1:OdE7CF6DbADk7lN8LIKRzRJTTZXIjtWgA5THM5lhBAw=

0 comments on commit 279a547

Please sign in to comment.