Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

Commit

Permalink
jonnenauhaGH-37 Fix version parsing regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Katoga committed Oct 18, 2018
1 parent 5264386 commit 774f3a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion varnish.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (v *varnishVersion) queryVersion() error {
}

func (v *varnishVersion) parseVersion(version string) error {
r := regexp.MustCompile(`(\d)\.?(\d)?\.?(\d)?(?:.*revision\s(.*)\))?`)
r := regexp.MustCompile(`(\d+)\.?(\d+)?\.?(\d+)?(?:.*revision\s(.*)\))?`)
parts := r.FindStringSubmatch(version)
if len(parts) > 1 {
if err := v.set(parts[1:]); err != nil {
Expand Down

0 comments on commit 774f3a8

Please sign in to comment.