diff options
author | Runxi Yu <me@runxiyu.org> | 2025-08-12 11:01:07 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-09-26 17:25:37 +0800 |
commit | e238ccb06b05e88ec323ca95ad4600bd79743372 (patch) | |
tree | 46f82d4d0f4ec43e94dcde5677de1ba857862638 /forged/internal/common/bare/unions.go | |
parent | Remove forge-specific functions from misc (diff) | |
download | forge-master.tar.gz forge-master.tar.zst forge-master.zip |
Diffstat (limited to '')
-rw-r--r-- | forged/internal/common/bare/unions.go (renamed from forged/internal/bare/unions.go) | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/forged/internal/bare/unions.go b/forged/internal/common/bare/unions.go index 0270a5f..1020fa0 100644 --- a/forged/internal/bare/unions.go +++ b/forged/internal/common/bare/unions.go @@ -21,8 +21,10 @@ type UnionTags struct { types map[uint64]reflect.Type } -var unionInterface = reflect.TypeOf((*Union)(nil)).Elem() -var unionRegistry map[reflect.Type]*UnionTags +var ( + unionInterface = reflect.TypeOf((*Union)(nil)).Elem() + unionRegistry map[reflect.Type]*UnionTags +) func init() { unionRegistry = make(map[reflect.Type]*UnionTags) |