mirror of
https://github.com/go-gitea/yaml.git
synced 2026-07-01 20:14:09 -04:00
Remove unreachable code to fix go vet (#249)
This commit is contained in:
committed by
Gustavo Niemeyer
parent
a3f3340b58
commit
cd8b52f826
@@ -120,7 +120,6 @@ func (p *parser) parse() *node {
|
||||
default:
|
||||
panic("attempted to parse unknown event: " + strconv.Itoa(int(p.event.typ)))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
func (p *parser) node(kind int) *node {
|
||||
|
||||
@@ -666,7 +666,6 @@ func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t,
|
||||
return yaml_emitter_set_emitter_error(emitter,
|
||||
"expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Expect ALIAS.
|
||||
|
||||
@@ -166,7 +166,6 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool
|
||||
default:
|
||||
panic("invalid parser state")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Parse the production:
|
||||
|
||||
Reference in New Issue
Block a user