Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mxssl committed Aug 19, 2022
1 parent 0133cfe commit 18c60c9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: exporter
image: mxssl/selectel-billing-exporter:1.0.1
image: mxssl/selectel-billing-exporter:1.0.2
command: ["./app"]
ports:
- containerPort: 80
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
selectel-billing-exporter:
container_name: selectel-billing-exporter
build: .
image: mxssl/selectel-billing-exporter:1.0.1
image: mxssl/selectel-billing-exporter:1.0.2
ports:
- "6789:80"
restart: always
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"context"
"encoding/json"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -67,7 +67,7 @@ func main() {
log.Println("Устанавливаем Selectel токен...")
ok := false
TOKEN, ok = os.LookupEnv("TOKEN")
if ok != true {
if !ok {
log.Fatal("Переменная окружения TOKEN, которая должна содержать Selectel API ключ не установлена")
}
log.Println("Токен успешно установлен!")
Expand Down Expand Up @@ -192,7 +192,7 @@ func getSelectelBilling(selectelMetrics *selectelBillingResponse) error {
return err
}

temp, err := ioutil.ReadAll(resp.Body)
temp, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"io/ioutil"
"os"
"testing"

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

testdata, err := ioutil.ReadFile("testdata/SelectelBillingRespExample.json")
testdata, err := os.ReadFile("testdata/SelectelBillingRespExample.json")
if err != nil {
t.Error(err)
}
Expand Down

0 comments on commit 18c60c9

Please sign in to comment.