From 69ae626f7259f6eeada1f0a037ab4d72d856c4e2 Mon Sep 17 00:00:00 2001 From: siyul-park Date: Sun, 26 Nov 2023 05:30:03 -0500 Subject: [PATCH] docs: fix comment --- pkg/symbol/symbol.go | 2 ++ pkg/symbol/table.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/symbol/symbol.go b/pkg/symbol/symbol.go index 9722362f..f357954a 100644 --- a/pkg/symbol/symbol.go +++ b/pkg/symbol/symbol.go @@ -15,6 +15,8 @@ type ( } ) +var _ node.Node = (*Symbol)(nil) + // ID returns the unique identifier of the Symbol, based on its Node. func (s *Symbol) ID() ulid.ULID { return s.Node.ID() diff --git a/pkg/symbol/table.go b/pkg/symbol/table.go index ab337934..a5ae5be9 100644 --- a/pkg/symbol/table.go +++ b/pkg/symbol/table.go @@ -27,7 +27,7 @@ type ( } ) -// NewTable creates a new SymbolTable with the specified options. +// NewTable returns a new SymbolTable with the specified options. func NewTable(opts ...TableOptions) *Table { var loadHooks []LoadHook var unloadHooks []UnloadHook @@ -293,7 +293,7 @@ func (t *Table) LookupByID(id ulid.ULID) (*Symbol, bool) { return sym, ok } -// LookupByID retrieves a Symbol by its namespace and name. +// LookupByName retrieves a Symbol by its namespace and name. func (t *Table) LookupByName(namespace, name string) (*Symbol, bool) { t.mu.RLock() defer t.mu.RUnlock()