var nl … // GoModLookup takes go.mod or go.work content, // finds the first line in the file starting with the given key, // and returns the value associated with that key. // // Lookup should only be used with non-factored verbs // such as "go" and "toolchain", usually to find versions // or version-like strings. func GoModLookup(gomod []byte, key string) string { … } func parseKey(line []byte, key string) (string, bool) { … }