diff --git a/.drone.yml b/.drone.yml index 2cf397a..02192b9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,7 @@ platform: steps: - name: environment - image: golang:1.19 + image: golang:1.21 commands: - go version - go env @@ -18,9 +18,9 @@ steps: path: /go - name: tools - image: golang:1.19 + image: golang:1.21 commands: - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1 + - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.1 - go install github.com/tebeka/go2xunit@latest - go install github.com/t-yuki/gocover-cobertura@latest volumes: @@ -30,7 +30,7 @@ steps: - environment - name: tidy - image: golang:1.19 + image: golang:1.21 commands: - go mod tidy - git diff --exit-code -- go.mod go.sum @@ -41,7 +41,7 @@ steps: - tools - name: lint - image: golang:1.19 + image: golang:1.21 commands: - echo 'Running linting' - golangci-lint run @@ -52,7 +52,7 @@ steps: - tools - name: test - image: golang:1.19 + image: golang:1.21 commands: - go test -cover -v ./... volumes: diff --git a/.golangci.yml b/.golangci.yml index ad29bf7..b7e7ac2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -62,7 +62,7 @@ linters: - bodyclose # checks whether HTTP response body is closed successfully - containedctx - decorder - - depguard + #- depguard - dupl # tool for code clone detection - durationcheck # check for two durations multiplied together - errcheck # checking for unchecked errors in go programs @@ -91,8 +91,7 @@ linters: - nolintlint # reports ill-formed or insufficient nolint directives - nonamedreturns - prealloc # finds slice declarations that could potentially be preallocated - # Disable has we have a lot of enum. TODO: find a better way - # - revive + - revive # Disable because of generic - sqlclosecheck - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks - stylecheck # a replacement for golint @@ -154,7 +153,7 @@ linters-settings: gosimple: # Select the Go version to target. The default is '1.13'. - go: "1.20.7" + go: "1.21.0" misspell: # Correct spellings using locale preferences for US or UK. @@ -189,13 +188,13 @@ linters-settings: staticcheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.7" + go: "1.21.0" # https://staticcheck.io/docs/options#checks checks: ["all"] stylecheck: # Select the Go version to target. The default is '1.13'. - go: "1.20.7" + go: "1.21.0" checks: ["all"] unparam: @@ -207,4 +206,4 @@ linters-settings: unused: # Select the Go version to target. The default is '1.13'. - go: "1.18.5" \ No newline at end of file + go: "1.21.0" \ No newline at end of file diff --git a/README.md b/README.md index a463c95..54eb9af 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# Tesla Stock Sdk +# Tesla Inventory Sdk -[![Build Status](https://drone.dev.m-and-m.ovh/api/badges/mderasse/teslastock_sdk/status.svg?ref=refs/heads/main)](https://drone.dev.m-and-m.ovh/mderasse/teslastock_sdk) +[![Build Status](https://drone.dev.m-and-m.ovh/api/badges/mderasse/teslainventory_sdk/status.svg?ref=refs/heads/main)](https://drone.dev.m-and-m.ovh/mderasse/teslainventory_sdk) diff --git a/client.go b/client.go index 6b7955e..83b6abd 100644 --- a/client.go +++ b/client.go @@ -1,4 +1,4 @@ -package teslastocksdk +package teslainventory_sdk import ( "bytes" diff --git a/client_options.go b/client_options.go index 2d527a1..e79a4dd 100644 --- a/client_options.go +++ b/client_options.go @@ -1,4 +1,4 @@ -package teslastocksdk +package teslainventory_sdk // ClientOptions allows for options to be passed into the Client for customization. type ClientOptions func(*Client) diff --git a/constant.go b/constant.go index 086edbb..63ad94e 100644 --- a/constant.go +++ b/constant.go @@ -1,4 +1,4 @@ -package teslastocksdk +package teslainventory_sdk const ( // Version is the current version of the sdk. diff --git a/error.go b/error.go index 6080dd9..d8ec41b 100644 --- a/error.go +++ b/error.go @@ -1,4 +1,4 @@ -package teslastocksdk +package teslainventory_sdk import "fmt" diff --git a/go.mod b/go.mod index 37d8cca..2970f3a 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module git.dev.m-and-m.ovh/mderasse/teslastock_sdk +module git.dev.m-and-m.ovh/mderasse/teslainventory_sdk -go 1.19 +go 1.21 diff --git a/stock.go b/inventory.go similarity index 97% rename from stock.go rename to inventory.go index 823d0a5..fb71964 100644 --- a/stock.go +++ b/inventory.go @@ -1,4 +1,4 @@ -package teslastocksdk +package teslainventory_sdk import ( "context" diff --git a/stock_struct.go b/inventory_struct.go similarity index 99% rename from stock_struct.go rename to inventory_struct.go index 126c28b..586eeb6 100644 --- a/stock_struct.go +++ b/inventory_struct.go @@ -1,4 +1,4 @@ -package teslastocksdk +package teslainventory_sdk import "time"