Skip to content

Commit

Permalink
trivial. version up golang 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
ktkfree committed Oct 23, 2023
1 parent 7f4f830 commit c293941
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openinfradev/tks-api

go 1.20
go 1.19

require (
github.com/Nerzal/gocloak/v13 v13.1.0
Expand Down
3 changes: 1 addition & 2 deletions internal/route/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"net/http"
"time"

Expand Down Expand Up @@ -216,7 +215,7 @@ func loggingMiddleware(next http.Handler) http.Handler {
if err == nil {
log.InfoWithContext(r.Context(), fmt.Sprintf("REQUEST BODY : %s", bytes.NewBuffer(body).String()))
}
r.Body = ioutil.NopCloser(bytes.NewBuffer(body))
r.Body = io.NopCloser(bytes.NewBuffer(body))

next.ServeHTTP(w, r)

Expand Down
6 changes: 3 additions & 3 deletions pkg/api-client/api-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"time"

Expand Down Expand Up @@ -72,7 +72,7 @@ func (c *ApiClientImpl) Get(path string) (out interface{}, err error) {
return nil, fmt.Errorf("Failed to call api server.")
}

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -132,7 +132,7 @@ func (c *ApiClientImpl) callWithBody(prefix string, method string, path string,
return nil, fmt.Errorf("Failed to call api server.")
}

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
Expand Down
12 changes: 6 additions & 6 deletions pkg/argo-client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"time"

Expand Down Expand Up @@ -64,7 +64,7 @@ func (c *ArgoClientImpl) GetWorkflowTemplates(namespace string) (*GetWorkflowTem
}
}()

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -95,7 +95,7 @@ func (c *ArgoClientImpl) GetWorkflow(namespace string, workflowName string) (*Wo
}
}()

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -128,7 +128,7 @@ func (c *ArgoClientImpl) GetWorkflowLog(namespace string, container string, work
}
}()

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return logs, err
}
Expand All @@ -154,7 +154,7 @@ func (c *ArgoClientImpl) GetWorkflows(namespace string) (*GetWorkflowsResponse,
}
}()

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -204,7 +204,7 @@ func (c *ArgoClientImpl) SumbitWorkflowFromWftpl(wftplName string, opts SubmitOp
}
}()

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package log

import (
"context"
"io/ioutil"
"io"
"os"
"strings"

Expand Down Expand Up @@ -109,5 +109,5 @@ func Fatalf(format string, v ...interface{}) {
}

func Disable() {
logger.Out = ioutil.Discard
logger.Out = io.Discard
}
6 changes: 3 additions & 3 deletions pkg/thanos-client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package thanos
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
"time"
Expand Down Expand Up @@ -63,7 +63,7 @@ func (c *ThanosClientImpl) Get(query string) (out Metric, err error) {
}
}()

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return out, err
}
Expand Down Expand Up @@ -100,7 +100,7 @@ func (c *ThanosClientImpl) FetchRange(query string, start int, end int, step int
}
}()

body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return out, err
}
Expand Down

0 comments on commit c293941

Please sign in to comment.