Skip to content

Commit

Permalink
make it future compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasJenicek committed Sep 30, 2024
1 parent 576c71e commit b822369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ func WebRPCHeader() string {
func ParseWebRPCGenVersions(header string) (*WebRPCGenVersions, error) {
versions := strings.Split(header, ";")

if len(versions) != 3 {
return nil, fmt.Errorf("expected 3 parts while parsing webrpc header: %s", header)
if len(versions) < 3 {
return nil, fmt.Errorf("expected at least 3 parts while parsing webrpc header: %s", header)
}

_, webrpcGenVersion, ok := strings.Cut(versions[0], "@")
Expand Down

0 comments on commit b822369

Please sign in to comment.