Skip to content

Commit f660dd8

Browse files
authored
Github actions and other updates (#8)
1 parent 8b7afd2 commit f660dd8

File tree

6 files changed

+73
-21
lines changed

6 files changed

+73
-21
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: github-actions
8+
directory: "/"
9+
schedule:
10+
interval: daily

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v3
18+
with:
19+
go-version: 'stable'
20+
21+
- name: Go Format
22+
run: gofmt -s -w . && git diff --exit-code
23+
24+
- name: Go Tidy
25+
run: go mod tidy && git diff --exit-code
26+
27+
- name: Go Mod
28+
run: go mod download
29+
30+
- name: Build
31+
run: go build ./...
32+
33+
- name: Test
34+
run: go test -v -race -shuffle=on ./...

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
[![Go Report Card](https://goreportcard.com/badge/github.com/go-toolsmith/astfmt)](https://goreportcard.com/report/github.com/go-toolsmith/astfmt)
2-
[![GoDoc](https://godoc.org/github.com/go-toolsmith/astfmt?status.svg)](https://godoc.org/github.com/go-toolsmith/astfmt)
3-
[![Build Status](https://travis-ci.org/go-toolsmith/astfmt.svg?branch=master)](https://travis-ci.org/go-toolsmith/astfmt)
4-
51
# astfmt
62

7-
Package astfmt implements ast.Node formatting with fmt-like API.
3+
[![build-img]][build-url]
4+
[![pkg-img]][pkg-url]
5+
[![reportcard-img]][reportcard-url]
6+
[![version-img]][version-url]
7+
8+
Package `astfmt` implements ast.Node formatting with fmt-like API.
89

910
## Installation
1011

12+
Go version 1.16+
13+
1114
```bash
1215
go get github.com/go-toolsmith/astfmt
1316
```
@@ -37,3 +40,16 @@ func Example() {
3740
pp.Println(x) // => foo(bar(baz(1 + 2)))
3841
}
3942
```
43+
44+
## License
45+
46+
[MIT License](LICENSE).
47+
48+
[build-img]: https://github.com/go-toolsmith/astfmt/workflows/build/badge.svg
49+
[build-url]: https://github.com/go-toolsmith/astfmt/actions
50+
[pkg-img]: https://pkg.go.dev/badge/go-toolsmith/astfmt
51+
[pkg-url]: https://pkg.go.dev/github.com/go-toolsmith/astfmt
52+
[reportcard-img]: https://goreportcard.com/badge/go-toolsmith/astfmt
53+
[reportcard-url]: https://goreportcard.com/report/go-toolsmith/astfmt
54+
[version-img]: https://img.shields.io/github/v/release/go-toolsmith/astfmt
55+
[version-url]: https://github.com/go-toolsmith/astfmt/releases

go.mod

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
module github.com/go-toolsmith/astfmt
22

3-
go 1.13
3+
go 1.16
44

5-
require (
6-
github.com/go-toolsmith/astequal v1.0.0 // indirect
7-
github.com/go-toolsmith/strparse v1.0.0
8-
)
5+
require github.com/go-toolsmith/strparse v1.0.0
6+
7+
require github.com/go-toolsmith/astequal v1.0.3 // indirect

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ=
2-
github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY=
1+
github.com/go-toolsmith/astequal v1.0.3 h1:+LVdyRatFS+XO78SGV4I3TCEA0AC7fKEGma+fH+674o=
2+
github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4=
33
github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4=
44
github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8=
5+
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171 h1:DZhP7zSquENyG3Yb6ZpGqNEtgE8dfXhcLcheIF9RQHY=
6+
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=

0 commit comments

Comments
 (0)