Copyright 2020 Google LLC. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package gensupport

import (
	
	
	
)
GoVersion returns the Go runtime version. The returned string has no whitespace.
func () string {
	return goVersion
}

var goVersion = goVer(runtime.Version())

const develPrefix = "devel +"

func ( string) string {
	if strings.HasPrefix(, develPrefix) {
		 = [len(develPrefix):]
		if  := strings.IndexFunc(, unicode.IsSpace);  >= 0 {
			 = [:]
		}
		return 
	}

	if strings.HasPrefix(, "go1") {
		 = [2:]
		var  string
		if  := strings.IndexFunc(, notSemverRune);  >= 0 {
			,  = [:], [:]
		}
		if strings.HasSuffix(, ".") {
			 += "0"
		} else if strings.Count(, ".") < 2 {
			 += ".0"
		}
		if  != "" {
			 += "-" + 
		}
		return 
	}
	return ""
}

func ( rune) bool {
	return !strings.ContainsRune("0123456789.", )