Skip to content

Commit

Permalink
chore(deps): update external module
Browse files Browse the repository at this point in the history
  • Loading branch information
thuongtruong109 committed Dec 13, 2024
1 parent d6deb04 commit f42dca5
Show file tree
Hide file tree
Showing 17 changed files with 292 additions and 100 deletions.
9 changes: 4 additions & 5 deletions cmd/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ package cmd
import (
"fmt"

gu_console "github.com/thuongtruong109/gouse/console"
gu_shared "github.com/thuongtruong109/gouse/shared"
"github.com/thuongtruong109/gouse"
"github.com/thuongtruong109/soundlib/pkg/constants"
)

func (d *Delivery) Execution() {
loop := func() {
gu_console.Banner(gu_shared.DOUBLE_ALPHA, "SOUNDLIB")
gouse.Banner(gouse.DOUBLE_ALPHA, constants.APP_NAME)

option := d.Run()
d.HandleOption(option)
Expand All @@ -22,10 +21,10 @@ func (d *Delivery) Execution() {
var input string
fmt.Scanln(&input)
if input == "y" {
gu_console.Clear()
gouse.Cls()
loop()
} else {
gu_console.Clear()
gouse.Cls()
d.helper.OutputNomal(constants.LABEL, constants.THANKYOU_TEXT)
break
}
Expand Down
11 changes: 6 additions & 5 deletions cmd/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package cmd
import (
"fmt"
"strings"

"github.com/AlecAivazis/survey/v2"
"github.com/thuongtruong109/gouse"
"golang.org/x/exp/slices"
gu_shared "github.com/thuongtruong109/gouse/shared"
)

type option struct {
Expand Down Expand Up @@ -74,7 +75,7 @@ func (d *Delivery) Run() int8{
var scopes []string

for _, option := range options {
scopes = append(scopes, fmt.Sprintf("%s%v", gu_shared.SCOPE_SYM, option.Name))
scopes = append(scopes, fmt.Sprintf("%s%v", gouse.SCOPE_SYM, option.Name))
}

var qs = []*survey.Question{
Expand All @@ -101,15 +102,15 @@ func (d *Delivery) Run() int8{
Key int8
Value string
}

var choices []Choice
var choiceValue []string

for _, option := range options {
if strings.Contains(answers.Scopes, option.Name) {
for _, item := range option.Items {
for k, v := range item {
choiceValue = append(choiceValue, fmt.Sprintf(gu_shared.DOT_SYM + v))
choiceValue = append(choiceValue, fmt.Sprintf(gouse.DOT_SYM + v))
getResult := &Choice{
Key: k,
Value: v,
Expand Down Expand Up @@ -142,7 +143,7 @@ func (d *Delivery) Run() int8{
}

idx := slices.IndexFunc(choices, func(c Choice) bool {
return strings.Contains(answers2.Options, c.Value)
return strings.Contains(answers2.Options, c.Value)
})

return int8(choices[idx].Key)
Expand Down
64 changes: 58 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,71 @@ go 1.23
require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/thuongtruong109/gouse v0.1.0
github.com/thuongtruong109/gouse v0.1.1-0.20241206030217-b9011911b337
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
)

require (
github.com/bytedance/sonic v1.9.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.9.1 // indirect
github.com/go-echarts/go-echarts/v2 v2.3.3 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.17.0 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/rivo/uniseg v0.4.4 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.16.0 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/minio-go/v7 v7.0.80 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/shirou/gopsutil/v4 v4.24.6 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.mongodb.org/mongo-driver v1.17.1 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/term v0.26.0 // indirect
golang.org/x/text v0.20.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit f42dca5

Please sign in to comment.