Skip to content

Commit

Permalink
Merge pull request #15 from i-sevostyanov/update-deps
Browse files Browse the repository at this point in the history
chore: update dependencies
  • Loading branch information
i-sevostyanov authored May 13, 2023
2 parents 21af16c + b08b05f commit 1dc2c14
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- name: Run coverage
run: make coverage
- name: Upload coverage to Codecov
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/lint-n-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ jobs:
golangci-lint:
strategy:
matrix:
go-version: [1.19.4]
go-version: ['1.20']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19.4
go-version: '1.20'
- name: lint
uses: golangci/golangci-lint-action@v3.3.1
uses: golangci/golangci-lint-action@v3.4.0
with:
version: latest
tests:
needs: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.19.4
go-version: '1.20'
- name: Run tests and coverage
run: make test
10 changes: 5 additions & 5 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
docker-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.19.4
go-version: '1.20'

- name: Prepare
id: prepare
Expand All @@ -22,10 +22,10 @@ jobs:
echo ::set-output name=tag_name::${TAG}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login into GitHub Container Registry
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
Expand Down
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ linters:
- varnamelen
- maintidx
- nilnil
- nonamedreturns
- forcetypeassert
- errcheck
- exhaustruct
- nosnakecase
- gocritic
fast: false

issues:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.4-alpine3.17 AS build-env
FROM golang:1.20-alpine3.17 AS build-env

# Set environment variables
ENV GO_WORKDIR /go/src/github.com/i-sevostyanov/NanoDB
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/i-sevostyanov/NanoDB

go 1.19
go 1.20

require (
github.com/golang/mock v1.6.0
github.com/olekukonko/tablewriter v0.0.5
github.com/stretchr/testify v1.8.2
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2
golang.org/x/sync v0.1.0
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
golang.org/x/sync v0.2.0
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 h1:Jvc7gsqn21cJHCmAWx0LiimpP18LZmUxkT5Mp7EZ1mI=
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4=
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
2 changes: 1 addition & 1 deletion internal/repl/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Engine interface {
Exec(database, sql string) (columns []string, iter sql.RowIter, err error)
}

// Repl is a terminal-based front-end to NanoDB.
// Repl is terminal-based front-end to NanoDB.
type Repl struct {
input io.Reader
output io.Writer
Expand Down
7 changes: 2 additions & 5 deletions internal/sql/expr/comparison/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ func compareBool(left, right sql.Value) (sql.CompareType, error) {
rvalue uint8
)

leftRaw := left.Raw().(bool)
rightRaw := right.Raw().(bool)

if leftRaw {
if leftRaw := left.Raw().(bool); leftRaw {
lvalue = 1
}

if rightRaw {
if rightRaw := right.Raw().(bool); rightRaw {
rvalue = 1
}

Expand Down
7 changes: 2 additions & 5 deletions internal/sql/expr/comparison/greater_or_equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,11 @@ func greaterOrEqualBool(left, right sql.Value) sql.Value {
rvalue uint8
)

leftRaw := left.Raw().(bool)
rightRaw := right.Raw().(bool)

if leftRaw {
if leftRaw := left.Raw().(bool); leftRaw {
lvalue = 1
}

if rightRaw {
if rightRaw := right.Raw().(bool); rightRaw {
rvalue = 1
}

Expand Down
7 changes: 2 additions & 5 deletions internal/sql/expr/comparison/greater_than.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,11 @@ func greaterThanBool(left, right sql.Value) sql.Value {
rvalue uint8
)

leftRaw := left.Raw().(bool)
rightRaw := right.Raw().(bool)

if leftRaw {
if leftRaw := left.Raw().(bool); leftRaw {
lvalue = 1
}

if rightRaw {
if rightRaw := right.Raw().(bool); rightRaw {
rvalue = 1
}

Expand Down
7 changes: 2 additions & 5 deletions internal/sql/expr/comparison/less_or_equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,11 @@ func lessOrEqualBool(left, right sql.Value) sql.Value {
rvalue uint8
)

leftRaw := left.Raw().(bool)
rightRaw := right.Raw().(bool)

if leftRaw {
if leftRaw := left.Raw().(bool); leftRaw {
lvalue = 1
}

if rightRaw {
if rightRaw := right.Raw().(bool); rightRaw {
rvalue = 1
}

Expand Down
7 changes: 2 additions & 5 deletions internal/sql/expr/comparison/less_than.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,11 @@ func lessThanBool(left, right sql.Value) sql.Value {
rvalue uint8
)

leftRaw := left.Raw().(bool)
rightRaw := right.Raw().(bool)

if leftRaw {
if leftRaw := left.Raw().(bool); leftRaw {
lvalue = 1
}

if rightRaw {
if rightRaw := right.Raw().(bool); rightRaw {
rvalue = 1
}

Expand Down

0 comments on commit 1dc2c14

Please sign in to comment.