Skip to content

Commit

Permalink
Go Modules (#14)
Browse files Browse the repository at this point in the history
* checkpoint

* Create go.yml

* Update go.yml
  • Loading branch information
rodaine committed Jul 11, 2020
1 parent 212a2ad commit 7577773
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 25 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: go get -v -t -d ./...

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

- name: Test
run: go test -v -race -cover ./...
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/rodaine/table

go 1.14

require (
github.com/mattn/go-runewidth v0.0.9
github.com/stretchr/testify v1.6.1
)
13 changes: 13 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
9 changes: 0 additions & 9 deletions makefile

This file was deleted.

6 changes: 1 addition & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Package table provides a convenient way to generate tabular output of any data,
**Download the package:**

```sh
go get -u github.com/rodaine/table
go get github.com/rodaine/table
```

**Example:**
Expand Down Expand Up @@ -52,10 +52,6 @@ func main() {

_Consult the [documentation](https://godoc.org/github.com/rodaine/table) for further examples and usage information_

## Contributing

Please feel free to submit an [issue](https://github.com/rodaine/table/issues) or [PR](https://github.com/rodaine/table/pulls) to this repository for features or bugs. All submitted code must pass the scripts specified within [.travis.yml](https://github.com/rodaine/table/blob/master/.travis.yml) and should include tests to back up the changes.

## License

table is released under the MIT License (Expat). See the [full license](https://github.com/rodaine/table/blob/master/license).
2 changes: 1 addition & 1 deletion table.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func (t *table) AddRow(vals ...interface{}) Table {
func (t *table) Print() {
format := strings.Repeat("%s", len(t.header)) + "\n"
t.calculateWidths()
fmt.Fprintln(t.Writer)

t.printHeader(format)
for _, row := range t.rows {
t.printRow(format, row)
Expand Down

0 comments on commit 7577773

Please sign in to comment.