-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
service/dap: Add buildFlags error checking and tests in launch reques…
…ts (#2056) * service/dap: Add error checking and tests for buildFlags in launch requests * Clarify with comments and better naming * Undo redundant support.go changes * Undo redundant support.go changes (attempt #2) Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
// To be set via | ||
// go build -ldflags '-X main.Hello=World' | ||
var Hello string | ||
|
||
func main() { | ||
if len(Hello) < 1 { | ||
panic("global main.Hello not set via build flags") | ||
} | ||
fmt.Printf("Hello %s!\n", Hello) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters