Skip to content

Commit

Permalink
Group function together.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedric BAIL committed Jan 17, 2023
1 parent 86de3f7 commit 7232d89
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cmd/fyne/internal/commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,19 +291,6 @@ func (b *Builder) build() error {
return err
}

func extractLdflagsFromGoFlags() string {
goFlags := os.Getenv("GOFLAGS")

ldFlags, goFlags := extractLdFlags(goFlags)
if goFlags != "" {
os.Setenv("GOFLAGS", goFlags)
} else {
os.Unsetenv("GOFLAGS")
}

return ldFlags
}

func (b *Builder) computeSrcDir(fyneGoModRunner runner) (string, error) {
if b.goPackage == "" || b.goPackage == "." {
return b.srcdir, nil
Expand Down Expand Up @@ -397,6 +384,19 @@ func appendEnv(env *[]string, varName, value string) {
*env = append(*env, varName+"="+value)
}

func extractLdflagsFromGoFlags() string {
goFlags := os.Getenv("GOFLAGS")

ldFlags, goFlags := extractLdFlags(goFlags)
if goFlags != "" {
os.Setenv("GOFLAGS", goFlags)
} else {
os.Unsetenv("GOFLAGS")
}

return ldFlags
}

func extractLdFlags(goFlags string) (string, string) {
if goFlags == "" {
return "", ""
Expand Down

0 comments on commit 7232d89

Please sign in to comment.