Skip to content

Commit f5bbce5

Browse files
mogthesprogim-kulikov
authored andcommitted
Remove unreachable code to fix go vet (go-yaml#249)
1 parent a1a0867 commit f5bbce5

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

decode.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ func (p *parser) parse() *node {
137137
default:
138138
panic("attempted to parse unknown event: " + strconv.Itoa(int(p.event.typ)))
139139
}
140-
panic("unreachable")
141140
}
142141

143142
func (p *parser) node(kind int) *node {

emitterc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,6 @@ func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t,
666666
return yaml_emitter_set_emitter_error(emitter,
667667
"expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS")
668668
}
669-
return false
670669
}
671670

672671
// Expect ALIAS.

parserc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool
166166
default:
167167
panic("invalid parser state")
168168
}
169-
return false
170169
}
171170

172171
// Parse the production:

0 commit comments

Comments
 (0)