refactor(info): 删除多余的信息结构体文件

- 移除了多个未使用的 Java 和 Go 信息结构体文件
- 优化了项目结构,减少了冗余代码
- 这些文件可能是早期开发阶段的遗留代码,现在已不再需要
This commit is contained in:
2025-06-23 10:15:22 +08:00
parent f081150178
commit cc9f1fb45a
167 changed files with 3732 additions and 3270 deletions

View File

@@ -0,0 +1,29 @@
package test_pack_init
import (
"bytes"
"github.com/lunixbochs/struc"
"sync"
"testing"
)
type Example struct {
I int `struc:int`
}
// TestParallelPack checks whether Pack is goroutine-safe. Run it with -race flag.
// Keep it as a single test in package since it is likely to be triggered on initialization
// of global objects reported as a data race by race detector.
func TestParallelPack(t *testing.T) {
var wg sync.WaitGroup
val := Example{}
for i := 0; i < 2; i++ {
wg.Add(1)
go func() {
defer wg.Done()
var buf bytes.Buffer
_ = struc.Pack(&buf, &val)
}()
}
wg.Wait()
}