Skip to content

Commit

Permalink
Upgrade to go 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbarsky committed Aug 23, 2023
1 parent 8c1aa7f commit 43e6e7e
Show file tree
Hide file tree
Showing 24 changed files with 28 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: "1.21"

- name: Build
run: GOOS=${{ matrix.go_os }} GOARCH=${{ matrix.go_arch }} CGO_ENABLED=0 go build -ldflags "-w" -trimpath -o ./aws-in-a-box-${{ matrix.go_os }}-${{ matrix.go_arch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: "1.21"

- name: Build
run: go build -v ./...
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.20.5-alpine AS build
WORKDIR src/
COPY go.mod go.sum .
FROM golang:1.21.0-alpine AS build
WORKDIR /src/
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags "-w" -trimpath -o /aws-in-a-box
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module aws-in-a-box

go 1.20
go 1.21

require (
github.com/aws/aws-sdk-go-v2 v1.20.0
Expand All @@ -11,7 +11,6 @@ require (
github.com/fxamacker/cbor/v2 v2.4.0
github.com/gofrs/uuid/v5 v5.0.0
github.com/google/go-cmp v0.5.9
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b
golang.org/x/net v0.14.0
)

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI=
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
Expand Down
2 changes: 1 addition & 1 deletion http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"fmt"
"hash/crc32"
"io"
"log/slog"
"net/http"
"strconv"

"github.com/fxamacker/cbor/v2"
"golang.org/x/exp/slog"

"aws-in-a-box/awserrors"
)
Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package main
import (
"flag"
"log"
"log/slog"
"os"
"runtime/debug"
"strings"
"time"

"golang.org/x/exp/slog"

"aws-in-a-box/arn"
"aws-in-a-box/http"
"aws-in-a-box/server"
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package server
import (
"bytes"
"io"
"log/slog"
"net/http"

"github.com/gofrs/uuid/v5"
"golang.org/x/exp/slog"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"
)
Expand Down
3 changes: 1 addition & 2 deletions services/dynamodb/dynamodb.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package dynamodb

import (
"log/slog"
"reflect"
"sync"

"golang.org/x/exp/slog"

"aws-in-a-box/arn"
"aws-in-a-box/awserrors"
)
Expand Down
2 changes: 1 addition & 1 deletion services/dynamodb/http.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dynamodb

import (
"golang.org/x/exp/slog"
"log/slog"

"aws-in-a-box/http"
)
Expand Down
3 changes: 1 addition & 2 deletions services/kinesis/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package kinesis
import (
"fmt"
"regexp"
"slices"
"time"

"golang.org/x/exp/slices"

"aws-in-a-box/arn"
"aws-in-a-box/awserrors"
)
Expand Down
2 changes: 1 addition & 1 deletion services/kinesis/http.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kinesis

import (
"golang.org/x/exp/slog"
"log/slog"

"aws-in-a-box/http"
)
Expand Down
2 changes: 1 addition & 1 deletion services/kinesis/itest/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package itest
import (
"bytes"
"context"
"log/slog"
"net"
"net/http"
"testing"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/kinesis"
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
"golang.org/x/exp/slog"

"aws-in-a-box/arn"
"aws-in-a-box/server"
Expand Down
3 changes: 1 addition & 2 deletions services/kinesis/kinesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ package kinesis
import (
"crypto/md5"
"fmt"
"log/slog"
"math/big"
"strconv"
"strings"
"sync"
"time"

"golang.org/x/exp/slog"

"aws-in-a-box/arn"
"aws-in-a-box/awserrors"
)
Expand Down
3 changes: 1 addition & 2 deletions services/kinesis/kinesis_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package kinesis

import (
"slices"
"strconv"
"strings"
"testing"

"golang.org/x/exp/slices"

"aws-in-a-box/arn"
)

Expand Down
2 changes: 1 addition & 1 deletion services/kms/http.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kms

import (
"golang.org/x/exp/slog"
"log/slog"

"aws-in-a-box/http"
)
Expand Down
2 changes: 1 addition & 1 deletion services/kms/itest/kms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"errors"
"log/slog"
"net"
"net/http"
"os"
Expand All @@ -15,7 +16,6 @@ import (
"github.com/aws/aws-sdk-go-v2/service/kms/types"
"github.com/aws/smithy-go"
"github.com/google/go-cmp/cmp"
"golang.org/x/exp/slog"

"aws-in-a-box/arn"
"aws-in-a-box/server"
Expand Down
5 changes: 2 additions & 3 deletions services/kms/key/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ import (
"errors"
"fmt"
"hash"
"maps"
"os"
"slices"
"time"

"golang.org/x/exp/maps"
"golang.org/x/exp/slices"

"aws-in-a-box/atomicfile"
"aws-in-a-box/services/kms/types"
)
Expand Down
2 changes: 1 addition & 1 deletion services/kms/kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"errors"
"fmt"
"hash"
"log/slog"
"os"
"path/filepath"
"regexp"
Expand All @@ -24,7 +25,6 @@ import (
"time"

"github.com/gofrs/uuid/v5"
"golang.org/x/exp/slog"

"aws-in-a-box/arn"
"aws-in-a-box/atomicfile"
Expand Down
3 changes: 1 addition & 2 deletions services/s3/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package s3
import (
"encoding/xml"
"io"
"log/slog"
"net/http"
"reflect"
"strconv"
"strings"

"golang.org/x/exp/slog"

"aws-in-a-box/awserrors"
)

Expand Down
2 changes: 1 addition & 1 deletion services/s3/itest/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package itest
import (
"context"
"io"
"log/slog"
"net"
"net/http"
"reflect"
Expand All @@ -13,7 +14,6 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"golang.org/x/exp/slog"

"aws-in-a-box/server"
s3Impl "aws-in-a-box/services/s3"
Expand Down
4 changes: 2 additions & 2 deletions services/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import (
"encoding/hex"
"fmt"
"io"
"log/slog"
"net/url"
"os"
"path/filepath"
"slices"
"strconv"
"strings"
"sync"
"time"

"github.com/gofrs/uuid/v5"
"golang.org/x/exp/slices"
"golang.org/x/exp/slog"

"aws-in-a-box/atomicfile"
"aws-in-a-box/awserrors"
Expand Down
2 changes: 1 addition & 1 deletion services/sqs/http.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sqs

import (
"golang.org/x/exp/slog"
"log/slog"

"aws-in-a-box/http"
)
Expand Down
5 changes: 2 additions & 3 deletions services/sqs/sqs.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package sqs

import (
"log/slog"
"maps"
"sync"

"golang.org/x/exp/maps"
"golang.org/x/exp/slog"

"aws-in-a-box/arn"
"aws-in-a-box/awserrors"
)
Expand Down

0 comments on commit 43e6e7e

Please sign in to comment.