mirror of
https://github.com/sequentialread/pow-captcha.git
synced 2025-03-30 15:08:29 +00:00
update to go version 16
This commit is contained in:
parent
2acb4f72f1
commit
c73a9c1c25
10
Dockerfile
10
Dockerfile
@ -1,15 +1,15 @@
|
||||
|
||||
FROM golang:1.15.2-alpine as build
|
||||
FROM golang:1.16-alpine as build
|
||||
ARG GOARCH=
|
||||
ARG GO_BUILD_ARGS=
|
||||
|
||||
RUN mkdir /build
|
||||
WORKDIR /build
|
||||
RUN apk add --update --no-cache ca-certificates git \
|
||||
&& go get golang.org/x/crypto/scrypt \
|
||||
&& go get github.com/pkg/errors
|
||||
RUN apk add --update --no-cache ca-certificates git
|
||||
COPY go.mod go.mod
|
||||
COPY go.sum go.sum
|
||||
COPY main.go main.go
|
||||
RUN go build -v $GO_BUILD_ARGS -o /build/sequentialread-pow-captcha .
|
||||
RUN go get && go build -v $GO_BUILD_ARGS -o /build/sequentialread-pow-captcha .
|
||||
|
||||
FROM alpine
|
||||
WORKDIR /app
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
VERSION="0.0.9"
|
||||
VERSION="0.0.10"
|
||||
|
||||
rm -rf dockerbuild || true
|
||||
mkdir dockerbuild
|
||||
|
8
go.mod
Normal file
8
go.mod
Normal file
@ -0,0 +1,8 @@
|
||||
module git.sequentialread.com/forest/sequentialread-pow-captcha
|
||||
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
git.sequentialread.com/forest/pkg-errors v0.9.2 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
|
||||
)
|
10
go.sum
Normal file
10
go.sum
Normal file
@ -0,0 +1,10 @@
|
||||
git.sequentialread.com/forest/pkg-errors v0.9.2 h1:j6pwbL6E+TmE7TD0tqRtGwuoCbCfO6ZR26Nv5nest9g=
|
||||
git.sequentialread.com/forest/pkg-errors v0.9.2/go.mod h1:8TkJ/f8xLWFIAid20aoqgDZcCj9QQt+FU+rk415XO1w=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
|
||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
4
main.go
4
main.go
@ -19,7 +19,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "git.sequentialread.com/forest/pkg-errors"
|
||||
"golang.org/x/crypto/scrypt"
|
||||
)
|
||||
|
||||
@ -159,7 +159,7 @@ func main() {
|
||||
|
||||
for _, fileInfo := range fileInfos {
|
||||
filenameSplit := strings.Split(fileInfo.Name(), "_")
|
||||
if len(filenameSplit) != 2 {
|
||||
if len(filenameSplit) == 2 {
|
||||
filepath := path.Join(apiTokensFolder, fileInfo.Name())
|
||||
content, err := ioutil.ReadFile(filepath)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user