File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package main
33import (
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 }
Original file line number Diff line number Diff line change 11package main
22
33import (
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 }
You can’t perform that action at this time.
0 commit comments