Skip to content

Commit

Permalink
[patch] upgraded all dependencies (#3)
Browse files Browse the repository at this point in the history
[-] removed travis, and using Github actions
[patch] moved interface definition to users.go instead of store and cache, so it's closer to the consumer of the interface
  • Loading branch information
bnkamalesh authored Feb 5, 2023
1 parent ee45d85 commit 17d30c0
Show file tree
Hide file tree
Showing 855 changed files with 86,167 additions and 52,582 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
23 changes: 23 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Test with Go 1.19"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Test
run: go test -coverprofile=coverage.txt -covermode=atomic $(go list ./... | grep -v /cmd)
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

60 changes: 32 additions & 28 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.18 AS builder
FROM golang:1.20 AS builder

COPY ${PWD} /app
COPY ../ /app
WORKDIR /app

RUN ls
# Toggle CGO on your app requirement
RUN CGO_ENABLED=0 go build -ldflags '-s -w -extldflags "-static"' -o /app/appbin *.go
RUN CGO_ENABLED=0 go build -ldflags '-s -w -extldflags "-static"' -o /app/appbin main.go
# Use below if using vendor
# RUN CGO_ENABLED=0 go build -mod=vendor -ldflags '-extldflags "-static"' -o /app/appbin *.go

Expand Down
33 changes: 33 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: "3.9"
services:
redis:
image: "redis:alpine"
networks:
- goapp_network

postgres:
image: "postgres"
environment:
POSTGRES_PASSWORD: gauserpassword
POSTGRES_USER: gauser
POSTGRES_DB: goapp
networks:
- goapp_network

goapp:
image: golang:1.20
volumes:
- ${PWD}:/app
working_dir: /app
# command: go run main.go
tty: true
ports:
- "8080:8080"
depends_on:
- redis
- postgres
networks:
- goapp_network

networks:
goapp_network:
40 changes: 19 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,40 @@ module github.com/bnkamalesh/goapp
go 1.17

require (
github.com/Masterminds/squirrel v1.5.2
github.com/bnkamalesh/errors v0.9.0
github.com/bnkamalesh/webgo/v6 v6.6.2
github.com/gomodule/redigo v1.8.8
github.com/jackc/pgx/v4 v4.15.0
github.com/Masterminds/squirrel v1.5.3
github.com/bnkamalesh/errors v0.9.4
github.com/bnkamalesh/webgo/v6 v6.7.0
github.com/jackc/pgx/v5 v5.2.0
github.com/redis/go-redis/v9 v9.0.2
go.elastic.co/apm v1.15.0
go.elastic.co/apm/module/apmhttp v1.15.0
)

require (
github.com/armon/go-radix v1.0.0 // indirect
github.com/elastic/go-licenser v0.4.0 // indirect
github.com/elastic/go-sysinfo v1.7.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/elastic/go-licenser v0.4.1 // indirect
github.com/elastic/go-sysinfo v1.9.0 // indirect
github.com/elastic/go-windows v1.0.1 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.11.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.2.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.10.0 // indirect
github.com/jackc/puddle v1.2.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/puddle/v2 v2.1.2 // indirect
github.com/jcchavezs/porto v0.4.0 // indirect
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect
go.elastic.co/fastjson v1.1.0 // indirect
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 // indirect
go.uber.org/atomic v1.10.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/sys v0.0.0-20220325203850-36772127a21f // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/tools v0.5.0 // indirect
howett.net/plist v1.0.0 // indirect
)
Loading

0 comments on commit 17d30c0

Please sign in to comment.