Fixes issue infinite loop of go get.

  This issue occurs infinite loop of "go get",
  and deadlock occurs when typing Ctrl+D immediately after gosh start.
  (See also #4691763)

  The workaround of #4691763 occurs goGet() goroutine terminating.
  This commit fixes these issues.

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>