feat: add golang filter and mcp-server (#1942)

Co-authored-by: johnlanni <zty98751@alibaba-inc.com>
This commit is contained in:
Jingze
2025-03-24 11:07:03 +08:00
committed by GitHub
parent 45fbc8b084
commit f5c1e7f2ec
14 changed files with 1942 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
FROM golang:1.23 AS golang-base
ARG GOPROXY
ARG GO_FILTER_NAME
ENV GOFLAGS=-buildvcs=false
ENV GOPROXY=${GOPROXY}
WORKDIR /workspace
COPY . .
WORKDIR /workspace/$GO_FILTER_NAME
RUN go mod tidy
RUN go build -o /$GO_FILTER_NAME.so -buildmode=c-shared .
FROM scratch AS output
ARG GO_FILTER_NAME
COPY --from=golang-base /$GO_FILTER_NAME.so $GO_FILTER_NAME.so