Skip to content

Commit

Permalink
chore: upgrade go to 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
andylibrian committed Nov 20, 2022
1 parent d93a780 commit 09aefa7
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 333 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
submodules: 'recursive'
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # @3.3.1
with:
go-version: '1.17'
go-version: '1.19'

- name: Set up Helm
uses: azure/setup-helm@f382f75448129b3be48f8121b9857be18d815a82 # @v3.4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
submodules: 'recursive'
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # @3.3.1
with:
go-version: '1.17'
go-version: '1.19'

- name: Start containers
run: docker-compose up -d
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
submodules: 'recursive'
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # @3.3.1
with:
go-version: '1.17'
go-version: '1.19'
- name: Set up Helm
uses: azure/setup-helm@f382f75448129b3be48f8121b9857be18d815a82 # @v3.4
with:
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
submodules: 'recursive'
- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # @3.3.1
with:
go-version: '1.17'
go-version: '1.19'
- run: sudo apt update && sudo apt install -y jq pkg-config libelf-dev clang
- run: go install google.golang.org/protobuf/cmd/protoc-gen-go@32051b4f86e54c2142c7c05362c6e96ae3454a1c # @v1.28.0
- run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@938f6e2f7550e542bd78f3b9e8812665db109e02 # @v1.1.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # @3.3.1
with:
go-version: '1.17'
go-version: '1.19'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
3 changes: 1 addition & 2 deletions cmd/tarian-cluster-agent/tarian-cluster-agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"log"
"net"
"os"
Expand Down Expand Up @@ -229,7 +228,7 @@ func newClusterAgentConfigFromCliContext(c *cli.Context, logger *zap.SugaredLogg
serverCAFile := c.String("server-tls-ca-file")

if serverCAFile != "" {
serverCACert, err := ioutil.ReadFile(serverCAFile)
serverCACert, err := os.ReadFile(serverCAFile)
if err != nil {
logger.Fatalw("failed to read server tls ca files", "filename", serverCAFile, "err", err)
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/tarian-server/tarian-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"crypto/tls"
"crypto/x509"
"io/ioutil"
"log"
"net/url"
"os"
Expand Down Expand Up @@ -231,7 +230,7 @@ func buildDgraphDialOpts(dgraphCfg dgraphstore.DgraphConfig, l *zap.SugaredLogge
}

if dgraphCfg.TLSCAFile != "" {
serverCACert, err := ioutil.ReadFile(dgraphCfg.TLSCAFile)
serverCACert, err := os.ReadFile(dgraphCfg.TLSCAFile)
if err != nil {
l.Fatalw("failed to read Dgraph TLS CA file", "filename", dgraphCfg.TLSCAFile, "err", err)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tarian welcomes and accepts contributions via GitHub pull requests.
## Pre-requisites

- Kubernetes cluster: minikube or kind
- [Go 1.17+](https://golang.org/)
- [Go 1.19+](https://golang.org/)
- [Kubectl](https://kubernetes.io/docs/tasks/tools/)
- Docker for developing with local cluster

Expand Down
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/kube-tarian/tarian

go 1.17
go 1.19

require (
github.com/go-logr/zapr v1.2.0
Expand Down
318 changes: 0 additions & 318 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/nodeagent/enrich_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package nodeagent

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
)
Expand All @@ -22,7 +22,7 @@ const (

func procsContainerID(pid uint32) (string, error) {
pidstr := fmt.Sprint(pid)
cgroups, err := ioutil.ReadFile(filepath.Join(HostProcDir, pidstr, "cgroup"))
cgroups, err := os.ReadFile(filepath.Join(HostProcDir, pidstr, "cgroup"))

if err != nil {
return "", err
Expand Down
4 changes: 2 additions & 2 deletions pkg/tarianctl/util/client_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package util
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"os"

"github.com/urfave/cli/v2"
"go.uber.org/zap"
Expand Down Expand Up @@ -41,7 +41,7 @@ func ClientOptionsFromCliContext(ctx *cli.Context) []grpc.DialOption {
serverCAFile := ctx.String("server-tls-ca-file")

if serverCAFile != "" {
serverCACert, err := ioutil.ReadFile(serverCAFile)
serverCACert, err := os.ReadFile(serverCAFile)
if err != nil {
logger.Fatalw("failed to read server tls ca files", "filename", serverCAFile, "err", err)
}
Expand Down

0 comments on commit 09aefa7

Please sign in to comment.