Skip to content

Commit

Permalink
ci:fixed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
urizennnn committed May 29, 2024
1 parent 8ebd59f commit 2646766
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 18 deletions.
1 change: 0 additions & 1 deletion errors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ func Check_Err(err error) {
fmt.Println(err)
}
}
return
}
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
github.com/charmbracelet/bubbles v0.18.0
github.com/charmbracelet/bubbletea v0.25.0
github.com/charmbracelet/lipgloss v0.10.0
github.com/joho/godotenv v1.5.1
github.com/spf13/cobra v1.8.0
golang.org/x/term v0.20.0
)
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:Yyn
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
Expand Down
4 changes: 3 additions & 1 deletion lib/cli/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/urizennnn/express-cli/errors"
"github.com/urizennnn/express-cli/lib/functions/config"
)

Expand Down Expand Up @@ -194,7 +195,8 @@ func Skip() config.User {
os.Exit(1)
}
var lines config.User
json.Unmarshal(contents, &lines)
err = json.Unmarshal(contents, &lines)
errors.Check_Err(err)
return lines
}

Expand Down
3 changes: 2 additions & 1 deletion lib/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ var initCmd = &cobra.Command{
if len(args) == 0 {
errors.Check_Err(Err.New(config.Red + "No arguments provided" + config.Reset))
errors.Check_Err(Err.New(config.Red + "Turning off generators..." + config.Reset))
cmd.Help()
err := cmd.Help()
errors.Check_Err(err)
time.Sleep(3 * time.Second)
return
}
Expand Down
17 changes: 8 additions & 9 deletions lib/functions/config/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
Err "github.com/urizennnn/express-cli/errors"
"github.com/urizennnn/express-cli/lib/process"
"golang.org/x/term"
"os"
"os/signal"
"path/filepath"
"strings"
"sync"
"syscall"
"time"

"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/urizennnn/express-cli/lib/process"
"golang.org/x/term"
)

var quitTextStyle = lipgloss.NewStyle().Margin(1, 0, 2, 4)

type errMsg error

type model struct {
Expand Down Expand Up @@ -79,7 +77,8 @@ func Run(cwd, DirName, manager, language string) int {
go func() {
defer wg.Done()
defer cancel()
process.CopyFilesToCWD(cwd, DirName, manager, language, cancel)
err := process.CopyFilesToCWD(cwd, DirName, manager, language, cancel)
Err.Check_Err(err)
}()

wg.Add(1)
Expand Down
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package main

import (
"github.com/joho/godotenv"
"github.com/urizennnn/express-cli/lib/cmd"
)

func main() {
godotenv.Load()

cmd.Execute()
}

0 comments on commit 2646766

Please sign in to comment.