Not Implemented Stub (ARCH5191)
Ce contenu n’est pas encore disponible dans votre langue.
Key go.quality.not-implemented-stub · Severity warning · Category quality
Stubs like panic("not implemented") crash at runtime. They are unfinished work left in production code paths.
Incorrect
Section titled “Incorrect”func (s *Service) Export() ([]byte, error) { panic("not implemented")}Correct
Section titled “Correct”func (s *Service) Export() ([]byte, error) { data, err := json.Marshal(s.records) if err != nil { return nil, err } return data, nil}Complete the stub with a real implementation, or remove the method/path entirely.