Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Jul 25, 2024
1 parent 8b1fbe8 commit 44d86c8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmd/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ func main() {
UsageText: "Upload, delete & edit DeWeb site from the terminal",
Version: config.Version,
Action: func(cCtx *cli.Context) error {
cli.ShowAppHelp(cCtx)
err := cli.ShowAppHelp(cCtx)
if err != nil {
return fmt.Errorf("failed to show app help: %v", err)
}
return nil
},

Expand All @@ -31,7 +34,6 @@ func main() {
Usage: "Upload a website",
ArgsUsage: "<wallet nickname> <website zip file path>",
Action: func(cCtx *cli.Context) error {

if cCtx.Args().Get(0) == "" {
return fmt.Errorf("wallet nickname is required")
}
Expand All @@ -45,7 +47,6 @@ func main() {
filepath := cCtx.Args().Get(1)

address, err := deployWebsite(config, filepath)

if err != nil {
logger.Fatalf("failed to deploy website: %v", err)
}
Expand All @@ -60,7 +61,6 @@ func main() {
Usage: "Edit website bytecode",
ArgsUsage: "<wallet nickname> <sc address> <website zip file path>",
Action: func(cCtx *cli.Context) error {

if cCtx.Args().Get(0) == "" {
return fmt.Errorf("wallet nickname is required")
}
Expand All @@ -82,7 +82,6 @@ func main() {
zipPath := cCtx.Args().Get(2)

bytecode, err := processFileForUpload(zipPath)

if err != nil {
logger.Fatalf("failed to process file for upload: %v", err)
}
Expand All @@ -108,7 +107,6 @@ func main() {
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}

}

func deployWebsite(config *pkgConfig.Config, filepath string) (string, error) {
Expand Down

0 comments on commit 44d86c8

Please sign in to comment.