Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 025fbc8

Browse files
committed
Go: Move definition of GoVersionInfo
1 parent bdae547 commit 025fbc8

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

go/extractor/project/project.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ type GoWorkspace struct {
4545
DepMode DependencyInstallerMode // A value indicating how to install dependencies for this workspace
4646
}
4747

48+
// Represents a nullable version string.
49+
type GoVersionInfo struct {
50+
// The version string, if any
51+
Version string
52+
// A value indicating whether a version string was found
53+
Found bool
54+
}
55+
4856
// Determines whether any of the directory paths in the input are nested.
4957
func checkDirsNested(inputDirs []string) (string, bool) {
5058
// replace "." with "" so that we can check if all the paths are nested
@@ -401,13 +409,6 @@ func GetBuildInfo(emitDiagnostics bool) []BuildInfo {
401409
return results
402410
}
403411

404-
type GoVersionInfo struct {
405-
// The version string, if any
406-
Version string
407-
// A value indicating whether a version string was found
408-
Found bool
409-
}
410-
411412
// Tries to open `go.mod` and read a go directive, returning the version and whether it was found.
412413
func TryReadGoDirective(buildInfo BuildInfo) GoVersionInfo {
413414
if buildInfo.DepMode == GoGetWithModules {

0 commit comments

Comments
 (0)