diff --git a/core/stores/sqlc/cachedsql.go b/core/stores/sqlc/cachedsql.go index 9a09802b..10012c4e 100644 --- a/core/stores/sqlc/cachedsql.go +++ b/core/stores/sqlc/cachedsql.go @@ -97,7 +97,8 @@ func (cc CachedConn) Exec(exec ExecFn, keys ...string) (sql.Result, error) { } // ExecCtx runs given exec on given keys, and returns execution result. -func (cc CachedConn) ExecCtx(ctx context.Context, exec ExecCtxFn, keys ...string) (sql.Result, error) { +func (cc CachedConn) ExecCtx(ctx context.Context, exec ExecCtxFn, keys ...string) ( + sql.Result, error) { res, err := exec(ctx, cc.db) if err != nil { return nil, err diff --git a/core/stringx/strings.go b/core/stringx/strings.go index 384dcf5f..850eaebf 100644 --- a/core/stringx/strings.go +++ b/core/stringx/strings.go @@ -103,7 +103,8 @@ func Reverse(s string) string { return string(runes) } -// Substr returns runes between start and stop [start, stop) regardless of the chars are ascii or utf8. +// Substr returns runes between start and stop [start, stop) +// regardless of the chars are ascii or utf8. func Substr(str string, start, stop int) (string, error) { rs := []rune(str) length := len(rs) diff --git a/tools/goctl/docker/docker.tpl b/tools/goctl/docker/docker.tpl index 40ef371d..250a9dd4 100644 --- a/tools/goctl/docker/docker.tpl +++ b/tools/goctl/docker/docker.tpl @@ -4,6 +4,7 @@ LABEL stage=gobuilder ENV CGO_ENABLED 0 {{if .Chinese}}ENV GOPROXY https://goproxy.cn,direct +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories {{end}}{{if .HasTimezone}} RUN apk update --no-cache && apk add --no-cache tzdata {{end}}