尝试编译通过 JNI 从 Java 调用的 Go 共享对象时出错
Golang小白一枚,正在不断学习积累知识,现将学习到的知识记录一下,也是将我的所得分享给大家!而今天这篇文章《尝试编译通过 JNI 从 Java 调用的 Go 共享对象时出错》带大家来了解一下##content_title##,希望对大家的知识积累有所帮助,从而弥补自己的不足,助力实战开发!
我正在尝试通过 jni 调用从 java 调用 go 函数。 java编译没问题。 当我尝试构建 go 共享对象 (.so) 时,它给出了有关可从 java 调用的 c 函数包装器的“多个定义”的错误。
这是java代码:
package yada.yada.locksmith;
import java.io.*;
public class locksmith {
private native void setup(string clientid, string clientsecret, string redirecturl, string authurl, string tokenurl, string userinfurl);
private native string auth(string user, string pw);
static {
system.loadlibrary("locksmith");
}
public static void locksmith(string[] args) {
locksmith locksmith = new locksmith();
locksmith.setup(
"yadayadayadayadayadayadayadayadayadayada",
"yadayadayadayadayadayadayadayadayadayada",
"https://yada.yada/yada/yada",
"https://yada.yada/yada/yada2",
"https://yada.yada/yada/yada3",
"https://yada.yada/yada/yada4"
);
// create the console object
console cnsl = system.console();
if (cnsl == null) {
system.out.println("no console available");
return;
}
string user = cnsl.readline("enter username : ");
char[] pw = cnsl.readpassword("enter password : ");
system.out.println(locksmith.auth(user,new string(pw)));
}
}
我编译它的是:
javac locksmith.java
然后我生成了头文件:
javac -h 。锁匠.java
这是生成的文件:
/* do not edit this file - it is machine generated */ #include/* header for class yada_yada_locksmith_locksmith */ #ifndef _included_yada_yada_locksmith_locksmith #define _included_yada_yada_locksmith_locksmith #ifdef __cplusplus extern "c" { #endif /* * class: yada_yada_locksmith_locksmith * method: setup * signature: (ljava/lang/string;ljava/lang/string;ljava/lang/string;ljava/lang/string;ljava/lang/string;ljava/lang/string;)v */ jniexport void jnicall java_yada_yada_locksmith_locksmith_setup (jnienv *, jobject, jstring, jstring, jstring, jstring, jstring, jstring); /* * class: yada_yada_locksmith_locksmith * method: auth * signature: (ljava/lang/string;ljava/lang/string;)ljava/lang/string; */ jniexport jstring jnicall java_yada_yada_locksmith_locksmith_auth (jnienv *, jobject, jstring, jstring); #ifdef __cplusplus } #endif #endif
然后我编写了 go 动态对象:
package main import ( // "io" // "fmt" "log" "sync" "net/url" "strings" "context" "net/http" "io/ioutil" "golang.org/x/oauth2" "github.com/chromedp/chromedp" "github.com/chromedp/cdproto/network" ) /* #cgo cflags: -i/usr/local/bin/jdk-15.0.1/include -i/usr/local/bin/jdk-15.0.1/include/linux #include#include // jni header provided by jdk #include "yada_yada_locksmith_locksmith.h" extern void setup(char *, char *, char *, char *, char *, char *); extern char *auth(char *, char *); jniexport void jnicall java_yada_yada_locksmith_locksmith_setup (jnienv *env, jobject this, jstring clientid, jstring clientsecret, jstring redirecturl, jstring authurl, jstring tokenurl, jstring userinfurl) { char *cclientid; char *cclientsecret; char *credirecturl; char *cauthurl; char *ctokenurl; char *cuserinfurl; cclientid = ((char *)(*env)->getstringutfchars(env, clientid, 0)); cclientsecret = ((char *)(*env)->getstringutfchars(env, clientsecret, 0)); credirecturl = ((char *)(*env)->getstringutfchars(env, redirecturl, 0)); cauthurl = ((char *)(*env)->getstringutfchars(env, authurl, 0)); ctokenurl = ((char *)(*env)->getstringutfchars(env, tokenurl, 0)); cuserinfurl = ((char *)(*env)->getstringutfchars(env, userinfurl, 0)); setup(cclientid, cclientsecret, credirecturl, cauthurl, ctokenurl, cuserinfurl); (*env)->releasestringutfchars(env, clientid, cclientid); (*env)->releasestringutfchars(env, clientsecret, cclientsecret); (*env)->releasestringutfchars(env, redirecturl, credirecturl); (*env)->releasestringutfchars(env, authurl, cauthurl); (*env)->releasestringutfchars(env, tokenurl, ctokenurl); (*env)->releasestringutfchars(env, userinfurl, cuserinfurl); } jniexport jstring jnicall java_yada_yada_locksmith_locksmith_auth (jnienv *env, jobject this, jstring user, jstring pw) { char *cuser; char *cpw; cuser = ((char *)(*env)->getstringutfchars(env, user, 0)); cpw = ((char *)(*env)->getstringutfchars(env, pw, 0)); // call auth(cuser, cpw); (*env)->releasestringutfchars(env, user, cuser); (*env)->releasestringutfchars(env, pw, cpw); } */ import "c" type oauthconft struct { cfg *oauth2.config userinfurl string } func main() { } var cfg oauthconft //export setup func setup(clientid, clientsecret, redirecturl, authurl, tokenurl, userinfurl *c.char) { // do stuff } //export auth func auth(user, pw *c.char) *c.char { // do stuff }
然后我编译 go 代码:
go build -o liblocksmith.so -buildmode=c-shared locksmith.go
这会给出以下错误消息:
/tmp/go-build051144078/b001/_x002.o: in function "java_yada_yada_locksmith_locksmith_setup": ./locksmith.go:29: multiple definition in "java_yada_yada_locksmith_locksmith_setup" /tmp/go-build051144078/b001/_x001.o:/tmp/go-build/locksmith.go:29: defined first here /tmp/go-build051144078/b001/_x002.o: in function "java_yada_yada_locksmith_locksmith_auth": ./locksmith.go:56: multiple definition in "java_yada_yada_locksmith_locksmith_auth" /tmp/go-build051144078/b001/_x001.o:/tmp/go-build/locksmith.go:56: defined first here collect2: error: ld returned 1 exit status
尝试编译添加 -x 标志会导致:
WORK=/tmp/go-build051144078 mkdir -p $WORK/b056/ cd /home/vuco/repos/go/src/runtime/cgo CGO_LDFLAGS='"-g" "-O2" "-lpthread"' /home/vuco/repos/go/pkg/tool/linux_amd64/cgo -objdir $WORK/b056/ -importpath runtime/cgo -import_runtime_cgo=false -import_syscall=false -exportheader=$WORK/b056/_cgo_install.h -- -I $WORK/b056/ -g -O2 -Wall -Werror ./cgo.go cd $WORK gcc -fno-caret-diagnostics -c -x c - -o /dev/null || true gcc -Qunused-arguments -c -x c - -o /dev/null || true gcc -fdebug-prefix-map=a=b -c -x c - -o /dev/null || true gcc -gno-record-gcc-switches -c -x c - -o /dev/null || true cd $WORK/b056 TERM='dumb' gcc -I /home/vuco/repos/go/src/runtime/cgo -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -Wall -Werror -o ./_x001.o -c _cgo_export.c TERM='dumb' gcc -I /home/vuco/repos/go/src/runtime/cgo -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -Wall -Werror -o ./_x002.o -c cgo.cgo2.c cd /home/vuco/repos/go/src/runtime/cgo TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x003.o -c gcc_context.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x004.o -c gcc_fatalf.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x005.o -c gcc_libinit.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x006.o -c gcc_linux_amd64.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x007.o -c gcc_mmap.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x008.o -c gcc_setenv.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x009.o -c gcc_sigaction.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x010.o -c gcc_traceback.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x011.o -c gcc_util.c TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I $WORK/b056/ -g -O2 -Wall -Werror -o $WORK/b056/_x012.o -c gcc_amd64.S cd $WORK/b056 TERM='dumb' gcc -I /home/vuco/repos/go/src/runtime/cgo -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -Wall -Werror -o ./_cgo_main.o -c _cgo_main.c cd /home/vuco/repos/go/src/runtime/cgo TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b056=/tmp/go-build -gno-record-gcc-switches -o $WORK/b056/_cgo_.o $WORK/b056/_cgo_main.o $WORK/b056/_x001.o $WORK/b056/_x002.o $WORK/b056/_x003.o $WORK/b056/_x004.o $WORK/b056/_x005.o $WORK/b056/_x006.o $WORK/b056/_x007.o $WORK/b056/_x008.o $WORK/b056/_x009.o $WORK/b056/_x010.o $WORK/b056/_x011.o $WORK/b056/_x012.o -g -O2 -lpthread TERM='dumb' /home/vuco/repos/go/pkg/tool/linux_amd64/cgo -dynpackage cgo -dynimport $WORK/b056/_cgo_.o -dynout $WORK/b056/_cgo_import.go -dynlinker mkdir -p $WORK/b051/ cd /home/vuco/repos/go/src/net CGO_LDFLAGS='"-g" "-O2"' /home/vuco/repos/go/pkg/tool/linux_amd64/cgo -objdir $WORK/b051/ -importpath net -exportheader=$WORK/b051/_cgo_install.h -- -I $WORK/b051/ -g -O2 ./cgo_linux.go ./cgo_resnew.go ./cgo_socknew.go ./cgo_unix.go cd $WORK/b051 TERM='dumb' gcc -I /home/vuco/repos/go/src/net -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b051=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -o ./_x001.o -c _cgo_export.c TERM='dumb' gcc -I /home/vuco/repos/go/src/net -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b051=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -o ./_x002.o -c cgo_linux.cgo2.c TERM='dumb' gcc -I /home/vuco/repos/go/src/net -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b051=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -o ./_x003.o -c cgo_resnew.cgo2.c TERM='dumb' gcc -I /home/vuco/repos/go/src/net -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b051=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -o ./_x004.o -c cgo_socknew.cgo2.c TERM='dumb' gcc -I /home/vuco/repos/go/src/net -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b051=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -o ./_x005.o -c cgo_unix.cgo2.c TERM='dumb' gcc -I /home/vuco/repos/go/src/net -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b051=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -o ./_cgo_main.o -c _cgo_main.c cd /home/vuco/repos/go/src/net TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b051=/tmp/go-build -gno-record-gcc-switches -o $WORK/b051/_cgo_.o $WORK/b051/_cgo_main.o $WORK/b051/_x001.o $WORK/b051/_x002.o $WORK/b051/_x003.o $WORK/b051/_x004.o $WORK/b051/_x005.o -g -O2 TERM='dumb' /home/vuco/repos/go/pkg/tool/linux_amd64/cgo -dynpackage net -dynimport $WORK/b051/_cgo_.o -dynout $WORK/b051/_cgo_import.go mkdir -p $WORK/b001/ cd /home/vuco/repos/yada/src/main/java/yada/yada/locksmith CGO_LDFLAGS='"-g" "-O2"' /home/vuco/repos/go/pkg/tool/linux_amd64/cgo -objdir $WORK/b001/ -importpath command-line-arguments -exportheader=$WORK/b001/_cgo_install.h -- -I $WORK/b001/ -g -O2 -I/usr/local/bin/jdk-15.0.1/include -I/usr/local/bin/jdk-15.0.1/include/linux ./locksmith.go cd $WORK/b001 TERM='dumb' gcc -I /home/vuco/repos/yada/src/main/java/yada/yada/locksmith -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -I/usr/local/bin/jdk-15.0.1/include -I/usr/local/bin/jdk-15.0.1/include/linux -o ./_x001.o -c _cgo_export.c TERM='dumb' gcc -I /home/vuco/repos/yada/src/main/java/yada/yada/locksmith -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -I/usr/local/bin/jdk-15.0.1/include -I/usr/local/bin/jdk-15.0.1/include/linux -o ./_x002.o -c locksmith.cgo2.c TERM='dumb' gcc -I /home/vuco/repos/yada/src/main/java/yada/yada/locksmith -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -I ./ -g -O2 -I/usr/local/bin/jdk-15.0.1/include -I/usr/local/bin/jdk-15.0.1/include/linux -o ./_cgo_main.o -c _cgo_main.c cd /home/vuco/repos/yada/src/main/java/yada/yada/locksmith TERM='dumb' gcc -I . -fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=$WORK/b001=/tmp/go-build -gno-record-gcc-switches -o $WORK/b001/_cgo_.o $WORK/b001/_cgo_main.o $WORK/b001/_x001.o $WORK/b001/_x002.o -g -O2 # command-line-arguments /tmp/go-build051144078/b001/_x002.o: In function "Java_yada_yada_locksmith_Locksmith_setup": ./locksmith.go:29: multiple definition in "Java_yada_yada_locksmith_Locksmith_setup" /tmp/go-build051144078/b001/_x001.o:/tmp/go-build/locksmith.go:29: defined first here /tmp/go-build051144078/b001/_x002.o: In function "Java_yada_yada_locksmith_Locksmith_auth": ./locksmith.go:56: multiple definition in "Java_yada_yada_locksmith_Locksmith_auth" /tmp/go-build051144078/b001/_x001.o:/tmp/go-build/locksmith.go:56: defined first here collect2: error: ld returned 1 exit status
程序版本是:
go版本go1.15.6 linux/amd64
javac 15.0.1
gcc(ubuntu 7.5.0-3ubuntu1~18.04)7.5.0
gnu ld(ubuntu 的 gnu binutils)2.30
解决方案
以下来自 cgo documentation 的内容是问题所在:
在文件中使用 //export 对前导码施加了限制:由于它被复制到两个不同的 c 输出文件中,因此它不能包含任何定义,只能包含声明。如果一个文件同时包含定义和声明,则两个输出文件将产生重复的符号,并且链接器将失败。为了避免这种情况,必须将定义放在其他文件或 c 源文件的前导码中。
移动线条
extern void setup(char *, char *, char *, char *, char *, char *); extern char *auth(char *, char *);
到文件 locksmith.h 和 locksmith.c 的 c 定义将产生以下序言,该序言将成功构建:
/* #cgo cflags: -i/usr/local/bin/jdk-15.0.1/include -i/usr/local/bin/jdk-15.0.1/include/linux #include "locksmith.h" */ import "c"
locksmith.c 的开头将包含以下内容:
#include#include // jni header provided by jdk #include "locksmith.h" #include "yada_yada_locksmith_locksmith.h"
此外,构建命令必须是
go build -o liblocksmith.so -buildmode=c-shared
最后没有 locksmith.go。
到这里,我们也就讲完了《尝试编译通过 JNI 从 Java 调用的 Go 共享对象时出错》的内容了。个人认为,基础知识的学习和巩固,是为了更好的将其运用到项目中,欢迎关注golang学习网公众号,带你了解更多关于的知识点!
是否可以执行内存映射的 PowerShell 脚本文件?
- 上一篇
- 是否可以执行内存映射的 PowerShell 脚本文件?
- 下一篇
- Golang 函数测试中的数据量Mock策略
-
- Golang · Go问答 | 1小时前 | Go问答 · 输入校验 · Go Base64解码 CorruptInputError base64.Encoding.Strict
- Go base64.Encoding.Strict 遇到非零填充位时的解码排查
- 480浏览 收藏
-
- Golang · Go问答 | 1小时前 | Go问答 · Go encoding/binary binary.Uvarint 截断输入 变长整数
- Go binary.Uvarint 返回 n=0 时怎样处理截断输入
- 346浏览 收藏
-
- Golang · Go问答 | 1小时前 | 标准库 · 接口设计 · Go问答 · encoding/json · Go encoding/json json.RawMessage JSON字段 部分更新
- Go json.RawMessage 如何区分字段缺失和显式 null
- 445浏览 收藏
-
- Golang · Go问答 | 1小时前 | Go问答 · 持续集成 · Go 测试产物 testing.T.ArtifactDir go test -artifacts CI排障
- Go testing.T.ArtifactDir 怎样配合 -artifacts 保存测试产物
- 226浏览 收藏
-
- Golang · Go问答 | 7小时前 | go · https · net/http · GetCertificate TLS配置 Go ServeTLS TLSConfig.Certificates GetConfigForClient 内存证书
- Go http.Server.ServeTLS 证书文件为空时如何使用 TLS 配置
- 168浏览 收藏
-
- Golang · Go问答 | 7小时前 | 标准库 · 错误处理 · Go问答 · Go Content-Type mime.ParseMediaType ErrInvalidMediaParameter
- Go mime.ParseMediaType 返回类型和错误同时存在时该怎么处理
- 374浏览 收藏
-
- Golang · Go问答 | 7小时前 |
- Go http.Server.ConnContext 怎么为每条连接附加自定义元数据
- 313浏览 收藏
-
- Golang · Go问答 | 7小时前 |
- Go http.Server.ErrorLog 怎样接管服务器内部错误输出
- 151浏览 收藏
-
- Golang · Go问答 | 7小时前 |
- Go httptest.NewRequestWithContext 怎样测试请求上下文取消
- 230浏览 收藏
-
- Golang · Go问答 | 8小时前 |
- Go testing/quick.Check 失败后怎样复现同一组输入
- 352浏览 收藏
-
- 前端进阶之JavaScript设计模式
- 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。
- 543次学习
-
- GO语言核心编程课程
- 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。
- 516次学习
-
- 简单聊聊mysql8与网络通信
- 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让
- 500次学习
-
- JavaScript正则表达式基础与实战
- 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。
- 487次学习
-
- 从零制作响应式网站—Grid布局
- 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。
- 485次学习
-
- PubMedQA
- 深入了解PubMedQA生物医学问答数据集,涵盖其核心功能、使用方法及在临床决策、药物研发等场景的应用,助力提升NLP模型性能。
- 457次使用
-
- H2O EvalGPT
- H2O EvalGPT是H2O.ai推出的开源LLM评估平台,提供详细的大模型性能排行榜、行业特定基准测试及A/B测试功能,助您快速选择最适合项目的高性能大语言模型。
- 521次使用
-
- LMArena
- LMArena是加州大学伯克利分校推出的AI模型匿名评测平台。通过盲测投票机制,用户可对比不同大模型回答并生成实时排行榜,助力开发者优化模型及用户选择最佳AI工具。
- 536次使用
-
- HELM
- 深入了解斯坦福推出的HELM(Holistic Evaluation of Language Models)大模型评测体系。本文解析其核心功能、安装配置步骤及应用场景,涵盖准确性、公平性、鲁棒性等多维度指标,助力开发者全面优化语言模型性能。
- 484次使用
-
- MMBench
- MMBench是由上海人工智能实验室等机构联合推出的多模态基准测试平台,提供细粒度能力评估、大规模数据集及VLMEvalKit工具。本文详细介绍其核心功能、安装使用方法及应用场景,助力开发者全面评估多模态模型性能。
- 306次使用
-
- 用Nginx反向代理部署go写的网站。
- 2023-01-17 502浏览
-
- GoLand调式动态执行代码
- 2023-01-13 502浏览
-
- Go crypto/rand.Text 的长度为什么不是固定字符数
- 2026-10-04 501浏览
-
- Go strings.ToValidUTF8 清洗日志内容的边界
- 2026-10-03 501浏览
-
- Go tls.GetCertificate 为什么收不到空 ServerName 请求
- 2026-09-27 501浏览

