Skip to content

Commit

Permalink
Remove unreachable code to fix go vet (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
mogthesprog authored and niemeyer committed Apr 7, 2017
1 parent a3f3340 commit cd8b52f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion emitterc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion parserc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cd8b52f

Please sign in to comment.