Skip to content

Commit

Permalink
Start testing with Go 1.19
Browse files Browse the repository at this point in the history
Applies Go 1.19 formatting to docblocks.
  • Loading branch information
bojanz committed Oct 3, 2022
1 parent 3632ccf commit 2649491
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.19.x

- name: Install tools
run: |
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
test:
strategy:
matrix:
go: ['1.17', '1.18']
go: ['1.17', '1.18', '1.19']
name: test @ Go ${{ matrix.go }}
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 3 additions & 4 deletions amount.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,9 @@ func (a Amount) RoundTo(digits uint8, mode RoundingMode) Amount {

// Cmp compares a and b and returns:
//
// -1 if a < b
// 0 if a == b
// +1 if a > b
//
// -1 if a < b
// 0 if a == b
// +1 if a > b
func (a Amount) Cmp(b Amount) (int, error) {
if a.currencyCode != b.currencyCode {
return -1, MismatchError{a, b}
Expand Down
10 changes: 5 additions & 5 deletions locale.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ func (l Locale) IsEmpty() bool {
// GetParent returns the parent locale for l.
//
// Order:
// 1. Language - Script - Territory (e.g. "sr-Cyrl-RS")
// 2. Language - Script (e.g. "sr-Cyrl")
// 3. Language (e.g. "sr")
// 4. English ("en")
// 5. Empty locale ("")
// 1. Language - Script - Territory (e.g. "sr-Cyrl-RS")
// 2. Language - Script (e.g. "sr-Cyrl")
// 3. Language (e.g. "sr")
// 4. English ("en")
// 5. Empty locale ("")
//
// Note that according to CLDR rules, certain locales have special parents.
// For example, the parent for "es-AR" is "es-419", and for "sr-Latn" it is "en".
Expand Down

0 comments on commit 2649491

Please sign in to comment.