From f75bfc20f78dda7caf86557d1d443ea96112ee35 Mon Sep 17 00:00:00 2001 From: Vincent Yang Date: Wed, 20 Mar 2024 16:52:54 -0400 Subject: [PATCH] ci: fix compile error --- .cross_compile.sh | 8 ++++---- Dockerfile | 1 + go.sum | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.cross_compile.sh b/.cross_compile.sh index 6bca164..a3ee9d3 100644 --- a/.cross_compile.sh +++ b/.cross_compile.sh @@ -2,8 +2,8 @@ ### # @Author: Vincent Young # @Date: 2022-10-20 02:19:06 - # @LastEditors: Vincent Young - # @LastEditTime: 2023-02-18 20:45:52 + # @LastEditors: Vincent Yang + # @LastEditTime: 2024-03-20 16:52:40 # @FilePath: /DeepLX/.cross_compile.sh # @Telegram: https://t.me/missuo # @@ -30,9 +30,9 @@ for pl in ${PLATFORMS}; do echo "build => ${TARGET}" if [ "${DEBUG_MODE}" == "debug" ]; then CGO_ENABLED=0 go build -trimpath -gcflags "all=-N -l" -o ${TARGET} \ - -ldflags "-w -s" main.go + -ldflags "-w -s" . else CGO_ENABLED=0 go build -trimpath -o ${TARGET} \ - -ldflags "-w -s" main.go + -ldflags "-w -s" . fi done diff --git a/Dockerfile b/Dockerfile index 50a396c..d07d483 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM golang:1.22 AS builder WORKDIR /go/src/github.com/OwO-Network/DeepLX COPY main.go ./ +COPY dto.go ./ COPY go.mod ./ COPY go.sum ./ RUN go get -d -v ./ diff --git a/go.sum b/go.sum index 769647e..20f4da8 100644 --- a/go.sum +++ b/go.sum @@ -23,6 +23,7 @@ github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=