Skip to content

Commit 88a6234

Browse files
authored
Merge pull request #128 from rwky/master
Multiple changes
2 parents 5ed5e70 + 500da07 commit 88a6234

File tree

7 files changed

+47
-11
lines changed

7 files changed

+47
-11
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
jobs:
7+
goreleaser:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- name: Setup Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version: 'stable'
18+
- name: Run GoReleaser
19+
uses: goreleaser/goreleaser-action@v6
20+
with:
21+
version: latest
22+
args: release --clean
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ gron
55
*.exe
66
cpu.out
77
gron.test
8-
8+
vendor

.goreleaser.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
- go mod vendor
7+
8+
source:
9+
enabled: true
10+
files:
11+
- vendor

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/tomnomnom/gron
22

3-
go 1.23.0
4-
5-
toolchain go1.23.2
3+
go 1.24
64

75
require (
86
github.com/fatih/color v1.18.0

identifier.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ var reservedWords = map[string]bool{
4545
// validIdentifier checks to see if a string is a valid
4646
// JavaScript identifier
4747
// E.g:
48-
// justLettersAndNumbers1 -> true
49-
// a key with spaces -> false
50-
// 1startsWithANumber -> false
48+
//
49+
// justLettersAndNumbers1 -> true
50+
// a key with spaces -> false
51+
// 1startsWithANumber -> false
5152
func validIdentifier(s string) bool {
5253
if reservedWords[s] || s == "" {
5354
return false
@@ -68,8 +69,9 @@ func validIdentifier(s string) bool {
6869
// validFirstRune returns true for runes that are valid
6970
// as the first rune in an identifier.
7071
// E.g:
71-
// 'r' -> true
72-
// '7' -> false
72+
//
73+
// 'r' -> true
74+
// '7' -> false
7375
func validFirstRune(r rune) bool {
7476
return unicode.In(r,
7577
unicode.Lu,

statements.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// A statement is a slice of tokens representing an assignment statement.
1515
// An assignment statement is something like:
1616
//
17-
// json.city = "Leeds";
17+
// json.city = "Leeds";
1818
//
1919
// Where 'json', '.', 'city', '=', '"Leeds"' and ';' are discrete tokens.
2020
// Statements are stored as tokens to make sorting more efficient, and so

ungron.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ package main
1515
import (
1616
"encoding/json"
1717
"fmt"
18+
"reflect"
1819
"strconv"
1920
"strings"
2021
"unicode"
2122
"unicode/utf8"
22-
"reflect"
2323

2424
"github.com/pkg/errors"
2525
)

0 commit comments

Comments
 (0)