Skip to content

Commit 18c60c9

Browse files
committed
fix lint
1 parent 0133cfe commit 18c60c9

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
terminationGracePeriodSeconds: 10
6969
containers:
7070
- name: exporter
71-
image: mxssl/selectel-billing-exporter:1.0.1
71+
image: mxssl/selectel-billing-exporter:1.0.2
7272
command: ["./app"]
7373
ports:
7474
- containerPort: 80

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
selectel-billing-exporter:
55
container_name: selectel-billing-exporter
66
build: .
7-
image: mxssl/selectel-billing-exporter:1.0.1
7+
image: mxssl/selectel-billing-exporter:1.0.2
88
ports:
99
- "6789:80"
1010
restart: always

main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"context"
55
"encoding/json"
6-
"io/ioutil"
6+
"io"
77
"log"
88
"net/http"
99
"os"
@@ -67,7 +67,7 @@ func main() {
6767
log.Println("Устанавливаем Selectel токен...")
6868
ok := false
6969
TOKEN, ok = os.LookupEnv("TOKEN")
70-
if ok != true {
70+
if !ok {
7171
log.Fatal("Переменная окружения TOKEN, которая должна содержать Selectel API ключ не установлена")
7272
}
7373
log.Println("Токен успешно установлен!")
@@ -192,7 +192,7 @@ func getSelectelBilling(selectelMetrics *selectelBillingResponse) error {
192192
return err
193193
}
194194

195-
temp, err := ioutil.ReadAll(resp.Body)
195+
temp, err := io.ReadAll(resp.Body)
196196
if err != nil {
197197
return err
198198
}

main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package main
22

33
import (
4-
"io/ioutil"
4+
"os"
55
"testing"
66

77
"github.com/jarcoal/httpmock"
@@ -12,7 +12,7 @@ func TestSelectelBillingRequest(t *testing.T) {
1212
httpmock.Activate()
1313
defer httpmock.DeactivateAndReset()
1414

15-
testdata, err := ioutil.ReadFile("testdata/SelectelBillingRespExample.json")
15+
testdata, err := os.ReadFile("testdata/SelectelBillingRespExample.json")
1616
if err != nil {
1717
t.Error(err)
1818
}

0 commit comments

Comments
 (0)