{"id":417761,"date":"2024-06-30T01:45:03","date_gmt":"2024-06-30T01:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=417761"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-30T01:45:03","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=417761","title":{"rendered":"<span>\u0411\u0438\u0442\u0432\u0430 \u0437\u0430 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f IDE stack trace \u0432 Go (\u0441 Bazel \u0438 \u0431\u0435\u0437)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f20\/2cf\/7ef\/f202cf7ef282ee5c5bd2ed95a5e28b05.JPG\" width=\"3583\" height=\"2498\"\/><\/figure>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430, \u043d\u043e \u0438 \u0441 \u0435\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439. \u0418 \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0439.<\/p>\n<p>\u0421 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0432 \u043b\u043e\u0433 \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043d\u0430\u043c\u0438 IDE (Idea, GoLand) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u0442\u0435\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u0443\u044e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c (<a href=\"https:\/\/www.jetbrains.com\/help\/idea\/analyzing-external-stacktraces.html\"><u>Analyze external stack traces<\/u><\/a>). \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0445\u043e\u0441\u0442\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 IDE.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043c\u044b \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 IDE.<\/p>\n<h2>\u0410 \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 go build?<\/h2>\n<p>\u0412 go build \u0434\u043b\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0435\u043a\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0440\u0443\u0447\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u0444\u043b\u0430\u0433 <code>-trimpath<\/code> \u2013 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043a \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c\u0443 \u0432\u0438\u0434\u0443, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>GOROOT_FINAL<\/code> \u2013 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0434\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u0441\u0442\u0435\u043a\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0444\u043b\u0430\u0433\u0435 <code>-trimpath<\/code>.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <a href=\"https:\/\/github.com\/bozaro\/go-stack-trace\">https:\/\/github.com\/bozaro\/go-stack-trace<\/a><\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 (<code>stacktrace\/main.go<\/code>):<\/p>\n<pre><code class=\"go\">package main  import ( \"fmt\"  \"github.com\/Masterminds\/cookoo\" \"github.com\/pkg\/errors\" )  func main() { \/\/ Build a new Cookoo app. registry, router, context := cookoo.Cookoo() \/\/ Fill the registry. registry.AddRoutes( cookoo.Route{ Name: \"TEST\", Help: \"A test route\", Does: cookoo.Tasks{ cookoo.Cmd{ Name: \"hi\", Fn:   HelloWorld, }, }, }, ) \/\/ Execute the route. router.HandleRequest(\"TEST\", context, false) }  func HelloWorld(cxt cookoo.Context, params *cookoo.Params) (interface{}, cookoo.Interrupt) { fmt.Printf(\"%+v\\n\", errors.New(\"Hello World\")) return true, nil }<\/code><\/pre>\n<p>\u0418 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <code>go.mod<\/code>:<\/p>\n<pre><code class=\"go\">module github.com\/bozaro\/go-stack-trace  go 1.20  require ( github.com\/Masterminds\/cookoo v1.3.0 github.com\/pkg\/errors v0.9.1 )<\/code><\/pre>\n<h3>\u0421\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 GOPATH<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043d\u0430\u0447\u043d\u0451\u043c \u0441\u043e \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0434\u043e\u0431\u0440\u043e\u0433\u043e <code>GOPATH<\/code>.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430:<\/p>\n<pre><code class=\"bash\">\u279c GO111MODULE=off GOPATH=$(pwd) go get -d github.com\/bozaro\/go-stack-trace\/stacktrace \u279c GO111MODULE=off GOPATH=$(pwd) go run github.com\/bozaro\/go-stack-trace\/stacktrace  Hello World main.HelloWorld \/home\/bozaro\/gopath\/src\/github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand \/home\/bozaro\/gopath\/src\/github.com\/Masterminds\/cookoo\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute \/home\/bozaro\/gopath\/src\/github.com\/Masterminds\/cookoo\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest \/home\/bozaro\/gopath\/src\/github.com\/Masterminds\/cookoo\/router.go:131 main.main \/home\/bozaro\/gopath\/src\/github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:27 runtime.main \/usr\/lib\/go-1.20\/src\/runtime\/proc.go:250 runtime.goexit \/usr\/lib\/go-1.20\/src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \u043f\u0443\u0442\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043b\u0438\u0431\u043e \u0432 <code>src<\/code> \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 GoLang, \u043b\u0438\u0431\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>GOPATH<\/code>.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0435\u043a \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 MacOS, \u0430 \u0441\u0431\u043e\u0440\u043a\u0430 \u0434\u043b\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 Linux, \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u043e.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0435\u0441\u0442\u044c \u0444\u043b\u0430\u0433 <code>-trimpath<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0435\u0437\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043e\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/p>\n<pre><code class=\"bash\">\u279c GO111MODULE=off GOPATH=$(pwd) go run -trimpath github.com\/bozaro\/go-stack-trace\/stacktrace Hello World main.HelloWorld github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand github.com\/Masterminds\/cookoo\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute github.com\/Masterminds\/cookoo\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest github.com\/Masterminds\/cookoo\/router.go:131 main.main github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:27 runtime.main runtime\/proc.go:250 runtime.goexit runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043f\u0443\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u043b\u0438\u0431\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>GOPATH<\/code>, \u043b\u0438\u0431\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>src<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 GoLang.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u044b\u0439 \u0432\u0438\u0434 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<h3>Go Modules<\/h3>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Go Modules \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 <code>-trimpath<\/code> \u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0432\u044b\u0432\u043e\u0434 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e:<\/p>\n<pre><code class=\"bash\">\u279c git clone https:\/\/github.com\/bozaro\/go-stack-trace.git . \u279c go run .\/stacktrace  Hello World main.HelloWorld \/home\/bozaro\/github\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand \/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute \/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest \/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:131 main.main \/home\/bozaro\/github\/go-stack-trace\/stacktrace\/main.go:27 runtime.main \/usr\/lib\/go-1.20\/src\/runtime\/proc.go:250 runtime.goexit \/usr\/lib\/go-1.20\/src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0418 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0441 <code>-trimpath<\/code>:<\/p>\n<pre><code class=\"bash\">\u279c go run -trimpath .\/stacktrace Hello World main.HelloWorld github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand github.com\/Masterminds\/cookoo@v1.3.0\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute github.com\/Masterminds\/cookoo@v1.3.0\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest github.com\/Masterminds\/cookoo@v1.3.0\/router.go:131 main.main github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:27 runtime.main runtime\/proc.go:250 runtime.goexit runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0411\u0435\u0437 <code>-trimpath<\/code> \u043c\u044b \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443 \u043d\u0430\u0441 \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>$HOME\/github\/go-stack-trace<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 GoLang \u0438\u0437 <code>$GOROOT\/src<\/code> (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>\/usr\/lib\/go-1.20\/src<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 <code>$GOMODCACHE<\/code> (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>$HOME\/go\/pkg\/mod<\/code>);<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 GOPATH, \u0444\u043b\u0430\u0433 <code>-trimpath<\/code> \u043d\u0435 \u043e\u0442\u0440\u0435\u0437\u0430\u0435\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u0430, \u0430 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442:<\/p>\n<ol>\n<li>\n<p>\u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u0437 <code>go.mod<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>$HOME\/github\/go-stack-trace<\/code> \u2192 <code>github.com\/bozaro\/go-stack-trace<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 GoLang \u0438\u0437 <code>$GOROOT\/src<\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>\/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0<\/code> \u2192 <code>github.com\/Masterminds\/cookoo@v1.3.0<\/code> \u2013 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u043e <code>Masterminds<\/code> \u0432 \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 \u0438 \u0438\u043c\u0435\u043d\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443).<\/p>\n<\/li>\n<\/ol>\n<h2>\u041a\u0430\u043a\u043e\u0439 stack trace \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f IDE?<\/h2>\n<p>\u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0432 Idea\/GoLand \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0441\u0442\u0435\u043a\u043e\u0432 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0442\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u043b\u044f <code>GOPATH<\/code> \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u043c\u0438\u043d\u0438-\u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Go Modules \u0438 \u0443 \u043d\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f Go Modules \u0431\u0435\u0437 <code>-trimpath<\/code> \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u0442\u0430\u043a \u043a\u0430\u043a, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0430\u0448 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u0441\u044f \u043e\u0442 <code>\/home\/bozaro<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f Go Modules \u0441 <code>-trimpath<\/code> \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 IDE \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/GO-13827\">https:\/\/youtrack.jetbrains.com\/issue\/GO-13827<\/a>), \u0430 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043f\u0443\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u043d\u044b \u0432 \u0441\u0442\u0435\u043a\u0435, \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0438\u0437 Go SDK.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e IDE \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0449\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u043f\u0443\u0442\u044f\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0435\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"bash\">main.HelloWorld stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:131 main.main stacktrace\/main.go:27 runtime.main GOROOT\/src\/runtime\/proc.go:250 runtime.goexit GOROOT\/src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u043f\u0443\u0442\u0438 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0442\u0435\u0439 \u0434\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u0434\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>$GOMODCACHE<\/code>, \u043d\u043e \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c <code>go\/pkg\/mod<\/code> (IDE \u043d\u0430\u0439\u0434\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>GOPATH<\/code> \u0438 <code>GOMODCACHE<\/code> \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00ab\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\u00bb);<\/p>\n<\/li>\n<li>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0442\u0435\u0439 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 Go SDK \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u043c \u0441\u043b\u043e\u0432\u043e <code>GOROOT<\/code>. \u041d\u0430\u043c \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043f\u0443\u0442\u044c, \u0447\u0442\u043e\u0431\u044b IDE \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0435\u0437 \u043f\u043b\u044f\u0441\u043e\u043a.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 IDE \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0451\u0442 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u0440\u043e\u043c\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0442 Go SDK. \u0412\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>GOPATH<\/code> \u0438\u043b\u0438 <code>GOMODCACHE<\/code>, \u043d\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e, \u043c\u043d\u0435 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e.<\/p>\n<h2>\u041a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435?<\/h2>\n<p>\u042f \u0432\u0438\u0436\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0442\u0438, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443<\/h3>\n<p>\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Go Build, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<h3>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c<\/h3>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"http:\/\/github.com\/joomcode\/errorx\">github.com\/joomcode\/errorx<\/a>, \u0430 \u0432 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c: <a href=\"https:\/\/pkg.go.dev\/github.com\/joomcode\/errorx#InitializeStackTraceTransformer\">https:\/\/pkg.go.dev\/github.com\/joomcode\/errorx#InitializeStackTraceTransformer<\/a><\/p>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u0442\u0438 \u0438\u0437 \u0432\u0438\u0434\u0430 \u0431\u0435\u0437 <code>-trimpath<\/code> \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>\u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u0440\u043e\u0448\u0435\u043b \u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0430, \u0442\u043e \u043e\u043d \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0441\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>pprof<\/code>, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u0442\u0435\u043a \u0431\u0440\u0430\u043b\u0441\u044f \u0438\u0437 \u043b\u043e\u0433\u043e\u0432 \u0438 \u0442\u0430\u043c \u043e\u043d \u0431\u044b\u043b \u0443\u0436\u0435 \u0432 \u0443\u0434\u043e\u0431\u043e\u0432\u0430\u0440\u0438\u043c\u043e\u043c \u0432\u0438\u0434\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438.<\/p>\n<h2>\u0412\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 Bazel<\/h2>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 \u043b\u043e\u0433 \u043d\u0430\u0441 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 Bazel. \u041d\u043e \u0441\u0431\u043e\u0440\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 Bazel \u0432\u044b\u0432\u0435\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c.<\/p>\n<h3>\u0424\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 bazel<\/h3>\n<pre><code class=\"bash\">\u279c bazel run \/\/stacktrace  ... INFO: Running command line: bazel-bin\/stacktrace\/stacktrace_\/stacktrace Hello World main.HelloWorld stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand external\/com_github_masterminds_cookoo\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute external\/com_github_masterminds_cookoo\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest external\/com_github_masterminds_cookoo\/router.go:131 main.main stacktrace\/main.go:27 runtime.main GOROOT\/src\/runtime\/proc.go:250 runtime.goexit src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u041c\u044b \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 Bazel \u043f\u043e \u0440\u044f\u0434\u0443 \u043f\u0440\u0438\u0447\u0438\u043d. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p>\u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c <code>BUILD<\/code>-\u0444\u0430\u0439\u043b\u044b \u0441\u0432\u043e\u0435\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 \u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0438\u0445 (\u043e\u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u0430\u044f, \u043d\u043e \u043d\u0435 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0430\u044f);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f IDE \u0438 <code>BUILD<\/code>-\u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0441\u0442\u0435\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043e\u0442 Bazel:<\/p>\n<ul>\n<li>\n<p>\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <code>external<\/code>-\u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 IDE \u043d\u0435 \u0432\u0438\u0434\u0438\u0442;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u043b\u044c\u0437\u044f \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0443\u0442\u044c \u0434\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0432 <code>GOMODCACHE<\/code> \u2013 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0432\u0438\u0434\u0430 <code>bazel-out\/k8-fastbuild-ST-2df1151a1acb\/...<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043f\u0443\u0442\u0438 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Bazel, \u043d\u043e \u0431\u0435\u0437 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043e\u043d\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0433\u0430\u044e\u0442.<\/p>\n<h3>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c<\/h3>\n<p>\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043d\u0435\u0447\u0442\u043e \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0435.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0447\u0435\u0440\u0435\u0437 <code>x_defs<\/code>, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438 <code>embed<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 external-\u0438\u043c\u0435\u043d\u0438 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u043c\u0443 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443 \u0432 \u0441\u0442\u0435\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u044f\u0434 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0443\u0442\u0435\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0442\u0430\u043b\u0430 \u043c\u0435\u043d\u0435\u0435 \u043e\u0441\u0442\u0440\u043e\u0439, \u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u044b\u043b \u043d\u0435\u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c:<\/p>\n<ul>\n<li>\n<p>\u0432 <code>pprof<\/code> \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0448\u043c\u0430\u0440;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0430\u0441\u0442\u044c \u043f\u0443\u0442\u0435\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u044b\u043b\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0438 \u0445\u0440\u0443\u043f\u043a\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430<\/h3>\n<p>\u0418\u0434\u0442\u0438 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c: \u043f\u043e\u043c\u0438\u043c\u043e \u0432\u0441\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0445\u0440\u0443\u043f\u043a\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0435\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u0435\u0449\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0437\u0430\u0448\u0438\u0432\u0430\u043b\u0438 \u0432 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 external-\u0438\u043c\u0435\u043d\u0438 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u043c\u0443 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443 \u0432 \u0441\u0442\u0435\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u043e \u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c \u0434\u0435\u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0442\u043e\u0440 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u043d\u043e \u0441\u0430\u043c\u0430 \u044d\u0442\u0430 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044f \u043d\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0448\u0430\u043b\u0430 \ud83d\ude41<\/p>\n<h3>\u041f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0444\u0430\u0439\u043b\u043e\u0432<\/h3>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Bazel \u0441\u0431\u043e\u0440\u043a\u0430 \u0438\u0434\u0451\u0442 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0447\u0435\u043c Go Build. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0430\u0434\u0435\u0436\u0434\u0430 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0438\u043c\u0435\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u0423 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>$(go env GOTOOLDIR)\/compile<\/code> \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>-trimpath<\/code>. \u041d\u043e \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u0436\u0435 \u043d\u0435 \u0431\u0443\u043b\u0435\u0432\u044b\u0439 \u0444\u043b\u0430\u0433, \u0430 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u0432.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <code>go_library<\/code> \u0438 <code>go_repository<\/code> \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/bazelbuild\/rules_go\/pull\/3307\">https:\/\/github.com\/bazelbuild\/rules_go\/pull\/3307<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/bazelbuild\/bazel-gazelle\/pull\/1379\">https:\/\/github.com\/bazelbuild\/bazel-gazelle\/pull\/1379<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0443\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0441\u0442\u0435\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"diff\">diff --git a\/deps.bzl b\/deps.bzl index ffe4981..d917282 100644 --- a\/deps.bzl +++ b\/deps.bzl @@ -5,6 +5,7 @@ def go_dependencies():          name = \"com_github_masterminds_cookoo\",          importpath = \"github.com\/Masterminds\/cookoo\",          sum = \"h1:zwplWkfGEd4NxiL0iZHh5Jh1o25SUJTKWLfv2FkXh6o=\", +        stackpath = \"go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\",          version = \"v1.3.0\",      )      go_repository( @@ -12,4 +13,5 @@ def go_dependencies():          importpath = \"github.com\/pkg\/errors\",          sum = \"h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\",          version = \"v0.9.1\", +        stackpath = \"go\/pkg\/mod\/github.com\/pkg\/errors@v0.9.1\",      )<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u0432\u0435\u0442\u043a\u0435 <code>bazel<\/code>:<\/p>\n<pre><code class=\"bash\">\u279c git checkout bazel \u279c bazel run \/\/stacktrace INFO: Running command line: bazel-bin\/stacktrace\/stacktrace_\/stacktrace Hello World main.HelloWorld stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:131 main.main stacktrace\/main.go:27 runtime.main GOROOT\/src\/runtime\/proc.go:250 runtime.goexit src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p><strong>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415:<\/strong> \u041f\u0430\u0442\u0447 \u043d\u0430 Gazelle \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0441\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u0438\u0434\u0430 <code>flag provided but not defined: -stack_path_prefix<\/code>, \u0442\u043e \u0434\u043b\u044f \u0435\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u0443 Gazelle. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043a\u044d\u0448 Bazel: <code>bazel clean --expunge &amp;&amp; bazel shutdown<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f) \u0438\u043b\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c, \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u043e \u0432\u0430\u0448\u0438\u0445 \u0431\u0438\u0442\u0432\u0430\u0445!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/727418\/\"> https:\/\/habr.com\/ru\/articles\/727418\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430, \u043d\u043e \u0438 \u0441 \u0435\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439. \u0418 \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0439.<\/p>\n<p>\u0421 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0432 \u043b\u043e\u0433 \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043d\u0430\u043c\u0438 IDE (Idea, GoLand) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u0442\u0435\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u0443\u044e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c (<a href=\"https:\/\/www.jetbrains.com\/help\/idea\/analyzing-external-stacktraces.html\"><u>Analyze external stack traces<\/u><\/a>). \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0445\u043e\u0441\u0442\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 IDE.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043c\u044b \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 IDE.<\/p>\n<h2>\u0410 \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 go build?<\/h2>\n<p>\u0412 go build \u0434\u043b\u044f \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0435\u043a\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0440\u0443\u0447\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u0444\u043b\u0430\u0433 <code>-trimpath<\/code> \u2013 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043a \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c\u0443 \u0432\u0438\u0434\u0443, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>GOROOT_FINAL<\/code> \u2013 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0434\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432 \u0441\u0442\u0435\u043a\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0444\u043b\u0430\u0433\u0435 <code>-trimpath<\/code>.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: <a href=\"https:\/\/github.com\/bozaro\/go-stack-trace\">https:\/\/github.com\/bozaro\/go-stack-trace<\/a><\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 (<code>stacktrace\/main.go<\/code>):<\/p>\n<pre><code class=\"go\">package main  import ( \"fmt\"  \"github.com\/Masterminds\/cookoo\" \"github.com\/pkg\/errors\" )  func main() { \/\/ Build a new Cookoo app. registry, router, context := cookoo.Cookoo() \/\/ Fill the registry. registry.AddRoutes( cookoo.Route{ Name: \"TEST\", Help: \"A test route\", Does: cookoo.Tasks{ cookoo.Cmd{ Name: \"hi\", Fn:   HelloWorld, }, }, }, ) \/\/ Execute the route. router.HandleRequest(\"TEST\", context, false) }  func HelloWorld(cxt cookoo.Context, params *cookoo.Params) (interface{}, cookoo.Interrupt) { fmt.Printf(\"%+v\\n\", errors.New(\"Hello World\")) return true, nil }<\/code><\/pre>\n<p>\u0418 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 <code>go.mod<\/code>:<\/p>\n<pre><code class=\"go\">module github.com\/bozaro\/go-stack-trace  go 1.20  require ( github.com\/Masterminds\/cookoo v1.3.0 github.com\/pkg\/errors v0.9.1 )<\/code><\/pre>\n<h3>\u0421\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 GOPATH<\/h3>\n<p>\u0414\u043b\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u043d\u0430\u0447\u043d\u0451\u043c \u0441\u043e \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0434\u043e\u0431\u0440\u043e\u0433\u043e <code>GOPATH<\/code>.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0432\u043e\u0434\u0430:<\/p>\n<pre><code class=\"bash\">\u279c GO111MODULE=off GOPATH=$(pwd) go get -d github.com\/bozaro\/go-stack-trace\/stacktrace \u279c GO111MODULE=off GOPATH=$(pwd) go run github.com\/bozaro\/go-stack-trace\/stacktrace  Hello World main.HelloWorld \/home\/bozaro\/gopath\/src\/github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand \/home\/bozaro\/gopath\/src\/github.com\/Masterminds\/cookoo\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute \/home\/bozaro\/gopath\/src\/github.com\/Masterminds\/cookoo\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest \/home\/bozaro\/gopath\/src\/github.com\/Masterminds\/cookoo\/router.go:131 main.main \/home\/bozaro\/gopath\/src\/github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:27 runtime.main \/usr\/lib\/go-1.20\/src\/runtime\/proc.go:250 runtime.goexit \/usr\/lib\/go-1.20\/src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \u043f\u0443\u0442\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043b\u0438\u0431\u043e \u0432 <code>src<\/code> \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 GoLang, \u043b\u0438\u0431\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>GOPATH<\/code>.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0435\u043a \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u043e\u0431\u0440\u0430\u043d \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0441 \u0442\u0435\u043c \u0436\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 MacOS, \u0430 \u0441\u0431\u043e\u0440\u043a\u0430 \u0434\u043b\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 Linux, \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c\u043e.<\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0435\u0441\u0442\u044c \u0444\u043b\u0430\u0433 <code>-trimpath<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0440\u0435\u0437\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043e\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/p>\n<pre><code class=\"bash\">\u279c GO111MODULE=off GOPATH=$(pwd) go run -trimpath github.com\/bozaro\/go-stack-trace\/stacktrace Hello World main.HelloWorld github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand github.com\/Masterminds\/cookoo\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute github.com\/Masterminds\/cookoo\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest github.com\/Masterminds\/cookoo\/router.go:131 main.main github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:27 runtime.main runtime\/proc.go:250 runtime.goexit runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043f\u0443\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u043b\u0438\u0431\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>GOPATH<\/code>, \u043b\u0438\u0431\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>src<\/code> \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 GoLang.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u044b\u0439 \u0432\u0438\u0434 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<h3>Go Modules<\/h3>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Go Modules \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 <code>-trimpath<\/code> \u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0432\u044b\u0432\u043e\u0434 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e:<\/p>\n<pre><code class=\"bash\">\u279c git clone https:\/\/github.com\/bozaro\/go-stack-trace.git . \u279c go run .\/stacktrace  Hello World main.HelloWorld \/home\/bozaro\/github\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand \/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute \/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest \/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:131 main.main \/home\/bozaro\/github\/go-stack-trace\/stacktrace\/main.go:27 runtime.main \/usr\/lib\/go-1.20\/src\/runtime\/proc.go:250 runtime.goexit \/usr\/lib\/go-1.20\/src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0418 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0441 <code>-trimpath<\/code>:<\/p>\n<pre><code class=\"bash\">\u279c go run -trimpath .\/stacktrace Hello World main.HelloWorld github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand github.com\/Masterminds\/cookoo@v1.3.0\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute github.com\/Masterminds\/cookoo@v1.3.0\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest github.com\/Masterminds\/cookoo@v1.3.0\/router.go:131 main.main github.com\/bozaro\/go-stack-trace\/stacktrace\/main.go:27 runtime.main runtime\/proc.go:250 runtime.goexit runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0411\u0435\u0437 <code>-trimpath<\/code> \u043c\u044b \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443 \u043d\u0430\u0441 \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>$HOME\/github\/go-stack-trace<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 GoLang \u0438\u0437 <code>$GOROOT\/src<\/code> (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>\/usr\/lib\/go-1.20\/src<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u0437 <code>$GOMODCACHE<\/code> (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>$HOME\/go\/pkg\/mod<\/code>);<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 GOPATH, \u0444\u043b\u0430\u0433 <code>-trimpath<\/code> \u043d\u0435 \u043e\u0442\u0440\u0435\u0437\u0430\u0435\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0430\u0439\u043b\u0430, \u0430 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0435\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442:<\/p>\n<ol>\n<li>\n<p>\u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f \u0438\u0437 <code>go.mod<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>$HOME\/github\/go-stack-trace<\/code> \u2192 <code>github.com\/bozaro\/go-stack-trace<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 GoLang \u0438\u0437 <code>$GOROOT\/src<\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0438\u043c\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435: <code>\/home\/bozaro\/go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0<\/code> \u2192 <code>github.com\/Masterminds\/cookoo@v1.3.0<\/code> \u2013 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u043e <code>Masterminds<\/code> \u0432 \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 \u0438 \u0438\u043c\u0435\u043d\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443).<\/p>\n<\/li>\n<\/ol>\n<h2>\u041a\u0430\u043a\u043e\u0439 stack trace \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f IDE?<\/h2>\n<p>\u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0432 Idea\/GoLand \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0441\u0442\u0435\u043a\u043e\u0432 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0442\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0434\u043b\u044f <code>GOPATH<\/code> \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u043c\u0438\u043d\u0438-\u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Go Modules \u0438 \u0443 \u043d\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f Go Modules \u0431\u0435\u0437 <code>-trimpath<\/code> \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u0442\u0430\u043a \u043a\u0430\u043a, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0430\u0448 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u0441\u044f \u043e\u0442 <code>\/home\/bozaro<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f Go Modules \u0441 <code>-trimpath<\/code> \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 IDE \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/GO-13827\">https:\/\/youtrack.jetbrains.com\/issue\/GO-13827<\/a>), \u0430 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043f\u0443\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u043d\u044b \u0432 \u0441\u0442\u0435\u043a\u0435, \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0438\u0437 Go SDK.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e IDE \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0449\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u043f\u0443\u0442\u044f\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0435\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"bash\">main.HelloWorld stacktrace\/main.go:31 github.com\/Masterminds\/cookoo.(*Router).doCommand go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:209 github.com\/Masterminds\/cookoo.(*Router).runRoute go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:164 github.com\/Masterminds\/cookoo.(*Router).HandleRequest go\/pkg\/mod\/github.com\/!masterminds\/cookoo@v1.3.0\/router.go:131 main.main stacktrace\/main.go:27 runtime.main GOROOT\/src\/runtime\/proc.go:250 runtime.goexit GOROOT\/src\/runtime\/asm_amd64.s:1598<\/code><\/pre>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u043f\u0443\u0442\u0438 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0442\u0435\u0439 \u0434\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u044c \u0434\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e <code>$GOMODCACHE<\/code>, \u043d\u043e \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c <code>go\/pkg\/mod<\/code> (IDE \u043d\u0430\u0439\u0434\u0435\u0442 \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>GOPATH<\/code> \u0438 <code>GOMODCACHE<\/code> \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u00ab\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\u00bb);<\/p>\n<\/li>\n<li>\n<p>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0442\u0435\u0439 \u0434\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0437 Go SDK \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0440\u0451\u043c \u0441\u043b\u043e\u0432\u043e <code>GOROOT<\/code>. \u041d\u0430\u043c \u0442\u0430\u043a \u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043f\u0443\u0442\u044c, \u0447\u0442\u043e\u0431\u044b IDE \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0435\u0437 \u043f\u043b\u044f\u0441\u043e\u043a.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 IDE \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0451\u0442 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u0440\u043e\u043c\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0442 Go SDK. \u0412\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>GOPATH<\/code> \u0438\u043b\u0438 <code>GOMODCACHE<\/code>, \u043d\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e, \u043c\u043d\u0435 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e.<\/p>\n<h2>\u041a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435?<\/h2>\n<p>\u042f \u0432\u0438\u0436\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0443\u0442\u0438, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u044b\u043b\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0444\u0430\u0439\u043b\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442;<\/p>\n<\/li>\n<li>\n<p>\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443<\/h3>\n<p>\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Go Build, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<h3>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0435\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c<\/h3>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"http:\/\/github.com\/joomcode\/errorx\">github.com\/joomcode\/errorx<\/a>, \u0430 \u0432 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c: <a href=\"https:\/\/pkg.go.dev\/github.com\/joomcode\/errorx#InitializeStackTraceTransformer\">https:\/\/pkg.go.dev\/github.com\/joomcode\/errorx#InitializeStackTraceTransformer<\/a><\/p>\n<p>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u0442\u0438 \u0438\u0437 \u0432\u0438\u0434\u0430 \u0431\u0435\u0437 <code>-trimpath<\/code> \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p>\u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043f\u0440\u043e\u0448\u0435\u043b \u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u0438\u043b\u044c\u0442\u0440\u0430, \u0442\u043e \u043e\u043d \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0441\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>pprof<\/code>, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0441\u0442\u0435\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u0442\u0435\u043a \u0431\u0440\u0430\u043b\u0441\u044f \u0438\u0437 \u043b\u043e\u0433\u043e\u0432 \u0438 \u0442\u0430\u043c \u043e\u043d \u0431\u044b\u043b \u0443\u0436\u0435 \u0432 \u0443\u0434\u043e\u0431\u043e\u0432\u0430\u0440\u0438\u043c\u043e\u043c \u0432\u0438\u0434\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438.<\/p>\n<h2>\u0412\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0443\u043d\u0434 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u0431\u043e\u0440\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 Bazel<\/h2>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c,<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-417761","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/417761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=417761"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/417761\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=417761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=417761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=417761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}