Skip to content

Commit

Permalink
Test golang build trim path
Browse files Browse the repository at this point in the history
  • Loading branch information
ledongthuc committed Mar 4, 2021
1 parent 42e8174 commit d459e0c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions go/trimpath/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Without trimpath:
```go run main.go

panic: DEBUG

goroutine 1 [running]:
main.main()
/Users/thucle/Projects/ledongthuc/notes/go/trimpath/main.go:4 +0x39
exit status 2
```

with trimpath:
```
go/trimpath [master●] » go run -trimpath main.go
panic: DEBUG
goroutine 1 [running]:
main.main()
command-line-arguments/main.go:4 +0x39
```
5 changes: 5 additions & 0 deletions go/trimpath/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func main() {
panic("DEBUG")
}

0 comments on commit d459e0c

Please sign in to comment.