Skip to content

Commit

Permalink
chore: update links (#63)
Browse files Browse the repository at this point in the history
* chore: update links
* chore: bump go version
* fix: dont set output
  • Loading branch information
jacoelho authored Nov 10, 2024
1 parent 2dabe29 commit 799cd50
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@ jobs:
- uses: "actions/checkout@v3"

- name: Fetch registry
run: curl --fail -sL https://www.swift.com/resource/iban-registry-pdf -o registry.pdf
run: |
curl --fail -Ls \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0' \
-H 'Accept: */*' \
-H 'Accept-Language: en-GB,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate, br, zstd' \
-H 'Connection: keep-alive' \
-H 'Referer: https://www.google.com' \
-H 'Sec-Fetch-Dest: script' \
-H 'Sec-Fetch-Mode: no-cors' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'TE: trailers' \
https://www.swift.com/node/9606 -o registry.pdf
- name: Cache hash
id: cache
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ go get -u github.com/jacoelho/banking

## IBAN

Supports IBAN validation based on [swift rules](https://www.swift.com/sites/default/files/resources/iban_registry.txt).
Supports IBAN validation based on [swift rules](https://www.swift.com/node/11971).

### Usage

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/jacoelho/banking

go 1.19
go 1.23
6 changes: 0 additions & 6 deletions iban/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package iban_test

import (
"fmt"
"math/rand"

"github.com/jacoelho/banking/iban"
)

Expand All @@ -22,14 +20,10 @@ func ExampleReplaceChecksum() {
}

func ExampleGenerate() {
// force results - not needed during regular usage
rand.Seed(1)

// Validate an iban using country specific validate function
result, _ := iban.Generate("GB")

fmt.Println(result)
// Output: GB21LBZG50604129841576
}

func ExampleGetBBAN() {
Expand Down
2 changes: 1 addition & 1 deletion registry/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/jacoelho/banking/registry

go 1.19
go 1.23

replace github.com/jacoelho/banking => ../

Expand Down

0 comments on commit 799cd50

Please sign in to comment.