/* A real block comment that mentions the import form must not be scanned as one. The dependency scanner walked every line looking for a line that is exactly `import (` and then took the first quoted string on the lines that followed, with no notion of comments. Inside a line comment that cannot happen, because every line begins with `//`. Inside a real block comment it can, and the scanner then adds a package that exists only in prose to the import list: import ( "example.com/not/a/real/package" ) The prose block's closing delimiter is spelled out in words here, because a literal one would end this comment: the scan also kept consuming the rest of the file looking for a line that is exactly a closing paren. extractImports now delegates to scanFileRegions, which classifies each line's CODE and tracks block-comment state, so one comment-aware scanner replaces two that could drift. */ package main import ( "time" ) func main() { // Termination: a batch program must still be stoppable, so the entry // handles the channel the runtime closes on SIGINT/SIGTERM. select { case <-shutdown: return default: } if time.UTC() == nil { panic("no UTC") } }