Closed luckyforme233 closed 2 years ago
@pubiu can you post a protofile that reproduces this?
@pubiu can you post a protofile that reproduces this?
package handlers
import (
"core/example-service/hook"
"core/example-service/svc"
"fmt"
"os"
"os/signal"
"syscall"
)
var (
env string // run environment
configFile string
)
func init() {
flag.StringVar(&env, "e", "local", "running environment")
flag.StringVar(&configFile, "c", "", "config file")
}
func InterruptHandler(errc chan<- error) {
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
terminateError := fmt.Errorf("%s", <-c)
// Place whatever shutdown handling you want here
errc <- terminateError
}
func SetConfig(cfg svc.Config) svc.Config {
return cfg
}
This code causes a running panic
@pubiu that's not the code causing the panic, it's something in ./proto/service.proto
which seems to not be parsing correctly. Perhaps you figured it out and that's why you closed the ticket? Otherwise I'll need to .proto
file to debug further.