Skip to content

Commit

Permalink
Merge pull request #154 from EasyPost/v2.13.0
Browse files Browse the repository at this point in the history
chore: prepare v2.13.0 for release
  • Loading branch information
Justintime50 authored Feb 21, 2023
2 parents 91600b9 + 4d45d1c commit 885733f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ jobs:
- name: Run Gosec
uses: securego/gosec@master
with:
args: -exclude-dir=examples ./...
args: -tests -exclude-dir=examples ./...
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CHANGELOG

## [Unreleased]
## v2.13.0 (2023-02-17)

- Adds `StatelessRate` object struct, `BetaGetStatelessRates` function to get ephemeral rates.
- Adds `LowestStatelessRate`, `LowestStatelessRateWithCarrier` and `LowestStatelessRateWithCarrierAndService` functions to get the lowest stateless rate from a list of stateless rates.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ release:

## gosec - Run gosec to scan for security issues
scan:
gosec ./...
gosec -tests --exclude-dir=examples ./...

## test - Test the project
test:
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (c *Client) do(ctx context.Context, method, path string, in, out interface{
if err != nil {
return err
}
defer res.Body.Close()
defer func() { _ = res.Body.Close() }()
if res.StatusCode >= 200 && res.StatusCode <= 299 {
if out != nil {
return json.NewDecoder(res.Body).Decode(out)
Expand Down
6 changes: 4 additions & 2 deletions tests/fixture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ func readFixtureData() Fixture {
parentDir := filepath.Dir(currentDir)
filePath := fmt.Sprintf("%s%s", parentDir, "/examples/official/fixtures/client-library-fixtures.json")

/* #nosec */
data, err := os.Open(filePath)
if err != nil {
fmt.Fprintln(os.Stderr, "error opening fixture file:", err)
os.Exit(1)
}

defer data.Close()
defer func() { _ = data.Close() }()

byteData, _ := ioutil.ReadAll(data)

Expand Down Expand Up @@ -185,13 +186,14 @@ func (fixture *Fixture) EventBody() []byte {
parentDir := filepath.Dir(currentDir)
filePath := fmt.Sprintf("%s%s", parentDir, "/examples/official/fixtures/event-body.json")

/* #nosec */
data, err := os.Open(filePath)
if err != nil {
fmt.Fprintln(os.Stderr, "error opening fixture file:", err)
os.Exit(1)
}

defer data.Close()
defer func() { _ = data.Close() }()

scanner := bufio.NewScanner(data)
var eventBody []byte
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package easypost

const Version = "2.12.0"
const Version = "2.13.0"

0 comments on commit 885733f

Please sign in to comment.