Home > front end >  Error "(no value) used as value" from Go compiler using oklog/run
Error "(no value) used as value" from Go compiler using oklog/run

Time:07-24

I am working on a simple example of enter image description here

CodePudding user response:

log.Errorf returns no value, but you are trying to return it via the return keyword.

Try this code instead:

if err := group.Run(); !errors.As(err, &run.SignalError{}) {
  log.Errorf("abnormal termination: %s", err)
  return
}
  • Related