Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Strappazzon C committed Aug 15, 2023
1 parent b56b786 commit 14691d3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 31 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
- name: Suspicious constructs
run: go vet ./...

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Build
run: go build -v ./...

release:
name: Build and deploy new release
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ To point to the local version of a dependency in Go rather than the one over the
And now when you compile this module (go install), it will use your local code rather than the other dependency.

```bash
go mod edit -replace github.com/debeando/go-common=/Users/nsc/go/src/github.com/debeando/demo
go mod edit -replace github.com/debeando/go-common=$HOME/go/src/github.com/debeando/go-common
```
8 changes: 4 additions & 4 deletions cli/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Arg struct {
Type uint8
Default any
Function func()
Value string
Value string
}

type Args []Arg
Expand All @@ -29,9 +29,9 @@ func (s *Args) unique(o Arg) bool {

func (s *Args) NamesLength() (l int) {
for _, i := range *s {
if len(i.Name) > l {
l = len(i.Name)
}
if len(i.Name) > l {
l = len(i.Name)
}
}
return l
}
6 changes: 3 additions & 3 deletions cli/cli.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cli

import (
"io"
"flag"
"fmt"
"io"
"strings"
)

Expand Down Expand Up @@ -60,9 +60,9 @@ func (c *CLI) Help() string {
required = " (Required)"
}

name := arg.Name
name := arg.Name
length := c.Args.NamesLength() - len(name)
name += strings.Repeat(" ", length)
name += strings.Repeat(" ", length)

help += fmt.Sprintf(" --%s\t%s%s\n", name, arg.Description, required)
}
Expand Down
19 changes: 0 additions & 19 deletions cli/cli_test.go

This file was deleted.

3 changes: 2 additions & 1 deletion cli/os_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cli
package cli_test

import (
"os"
"testing"

"github.com/debeando/go-common/cli"

"github.com/stretchr/testify/assert"
)

Expand Down

0 comments on commit 14691d3

Please sign in to comment.