From 1b2ef00e4e360440feba1313bcccfa7d0f64ed7c Mon Sep 17 00:00:00 2001 From: siyul-park Date: Sun, 26 Nov 2023 08:04:04 -0500 Subject: [PATCH] feat: add index if name is not zero --- pkg/symbol/table.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/symbol/table.go b/pkg/symbol/table.go index 7bdef3ea..f5cdfd93 100644 --- a/pkg/symbol/table.go +++ b/pkg/symbol/table.go @@ -114,7 +114,10 @@ func (t *Table) Close() error { func (t *Table) insert(sym *Symbol) error { t.symbols[sym.ID()] = sym - t.index[sym.Namespace()] = lo.Assign(t.index[sym.Namespace()], map[string]ulid.ULID{sym.Name(): sym.ID()}) + + if sym.Name() != "" { + t.index[sym.Namespace()] = lo.Assign(t.index[sym.Namespace()], map[string]ulid.ULID{sym.Name(): sym.ID()}) + } unlinks := map[string][]scheme.PortLocation{}