diff --git a/GetRuntimeAddresses/main.go b/GetRuntimeAddresses/main.go index 7bbafb6..3a4eddc 100644 --- a/GetRuntimeAddresses/main.go +++ b/GetRuntimeAddresses/main.go @@ -26,7 +26,7 @@ func main() { fmt.Printf("Created eBPF map (FD: %d)\n", mapFD) - scanner := symbolyze.New(*symbol, *glob) + scanner := symbolyze.NewScanner(*symbol, *glob) scanner.OnFound(mapFD.Set) if *debug { scanner.DebugOn() diff --git a/GetRuntimeAddresses/symbolyze/symbolyze.go b/GetRuntimeAddresses/symbolyze/symbolyze.go index 4dc8afd..d3c9f45 100644 --- a/GetRuntimeAddresses/symbolyze/symbolyze.go +++ b/GetRuntimeAddresses/symbolyze/symbolyze.go @@ -15,8 +15,8 @@ import ( // ELF-files matching a certain pattern. The pattern is described in // fileapth.Match(). // -// Once a Scanner is created with New(), it should be populated with Observer -// functions using OnFound(). Optionally, the scanner can be put into +// Once a Scanner is created with NewScanner(), it should be populated with +// Observer functions using OnFound(). Optionally, the scanner can be put into // debugging mode by a call to DebugOn() prior to a call to Run(). // // A call to Scanner.Run() then starts the engine and it will scan all pids in @@ -48,11 +48,11 @@ type logger = *log.Logger // They have to be thread-safe. type Observer func(pid int, offset uint64) error -// New returns a new Scanner that scans all running processes for the given -// symbol name in all memory-mapped files matching the given pathglob. +// NewScanner returns a new Scanner that scans all running processes for the +// given symbol name in all memory-mapped files matching the given pathglob. // To be useful, one or more Observer functions should be registerd with // Scanner.OnFound(). The scanning starts with a call of Scanner.Run(). -func New(symbol, pathglob string) *Scanner { +func NewScanner(symbol, pathglob string) *Scanner { return &Scanner{ symbol: symbol, pathglob: pathglob,