Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gopls is not working due to invalid channel id or vim-go: no file for file #2709

Closed
wzhan366 opened this issue Feb 10, 2020 · 30 comments
Closed

Comments

@wzhan366
Copy link

What did you do? (required: The issue will be closed when not provided)

I recently updated gopls to v0.3.1 from 0.2.2 then I'm keeping get

Error detected while processing function <SNR>138_handler[5]..go#guru#SameIds[15]..go#lsp#SameIDs[1]..go#lsp#DidChange[24]..336[47]..339:
line   11:
E900: Invalid channel id

sometimes, I will get the following when trying to go to definition

vim-go: no file for file:///$GOPATH/src/github.com/myproject/pkg/subscriber/namespace/secret_reconciler.go in package github.com/myproject/pkg/subscriber/namespace [github.com/myproject/pkg/subscriber/namespace.test]

plus, I can't go to definition.

What did you expect to happen?

What happened instead?

Configuration (MUST fill this out):

vim-go version:

['vim-go'].commit = 'd698de4'

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

vimrc
"""""""""" set up the vim-go

" set up where to hight
let g:go_highlight_types = 1
let g:go_highlight_functions = 1

let g:go_fmt_command = "goimports"
let g:go_fmt_fail_silently = 1
let g:go_auto_type_info = 1
" save file when run GoBuild
"
"
" shortcut for the quickfix
map :cnext
map :cprevious
nnoremap a :cclose
let g:go_list_type = "quickfix"
let g:go_def_mapping_enable=0
let g:go_gopls_complete_unimported=1
let g:go_rename_command = 'gopls'
"
" shortcut for GoBuild and run
autocmd FileType go nmap b (go-build)
autocmd FileType go nmap r (go-run)
autocmd FileType go nmap t (go-test)
autocmd FileType go nmap n (go-debug-next)
"
" set up tab as other editor
autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
"
" ctrkp-funky will list all the functions within a file
" the following is the hightligt of them
"
nnoremap :CtrlPFunky
let g:ctrlp_funky_syntax_highlight = 1
let g:ctrlp_working_path_mode = '0'
"
"
"
" GoMetaLinter settings
let g:go_metalinter_autosave = 1
let g:go_metalinter_command = "golangci-lint"
let g:go_list_type = 'quickfix'
let g:go_auto_sameids = 1

" set up the sign
let g:ale_sign_error = '⤫'
let g:ale_sign_warning = '⚠'" Enable integration with airline.

autocmd FileType go nmap i (go-info)
let g:go_auto_type_info = 1
autocmd BufWritePre *.go :call CocAction('runCommand', 'editor.action.organizeImport')

"""""end of vim-go lange"""""

Vim version (first three lines from :version):

NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5

Go version (go version):

go version go1.13.6 darwin/amd64

Go environment

go env Output:
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="$HOME/Library/Caches/go-build"
GOENV="$HOME/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-ldflags=-compressdwarf=false"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="$HOME/Documents/learngo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="$GOPATH/src/mypackage/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-
length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-buil
d679327097=/tmp/go-build -gno-record-gcc-switches -fno-common"

gopls version

gopls version Output:

golang.org/x/tools/gopls v0.3.1
golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=

@wzhan366 wzhan366 changed the title gopls is not working due to invalid channel id gopls is not working due to invalid channel id or vim-go: no file for file Feb 10, 2020
@bhcleek
Copy link
Collaborator

bhcleek commented Feb 10, 2020

Do you get this when g:go_auto_sameids=0 at all?

@wzhan366
Copy link
Author

Hi @bhcleek

Thanks for looking this up.

I did g:go_auto_sameids=0, now I'm seeing the second error when trying to go to definitions.

vim-go: no file for file:///$GOPATH/src/github.com/myproject/pkg/subscriber/namespace/reconciler.go in package github.com/myproject/pkg/subscriber/namespace [github.com/myproject/pkg/subscriber/namespace.test]

@bhcleek
Copy link
Collaborator

bhcleek commented Feb 10, 2020

Ok. To solve the problem with sameids, I'll need a some code to use that replicates the problem.

For the second error, does it literally have $GOPATH in the path, or did you just provide that to simplify the path for reporting purposes?

@wzhan366
Copy link
Author

For the first case, I was on this repo,
https://github.com/IBM/multicloud-operators-subscription/tree/master/pkg/subscriber/namespace

For the second issue, it does have the literal in the error message, I simplified it when reporting.

@bhcleek
Copy link
Collaborator

bhcleek commented Feb 11, 2020

I think we can figure both of these out, but I'll need to know how to duplicate this with more specificity; I've clone github.com/IBM/multicloud-operators-subscription and do not see any problems with sameids or jumping to definitions.

@wzhan366
Copy link
Author

now I'm downgrading to gopls 0.2.2, everything this fine. Whenever I update to gopls 0.3.1, I will have the issues.

That's the only difference between working and non-working cases for me. If you need more debug info, please let me know.

@bhcleek
Copy link
Collaborator

bhcleek commented Feb 11, 2020

Yes, I need to know the cursor locations when you see sameids and jumping to definition fail.

@wzhan366
Copy link
Author

it's odd, now I'm getting a different error message, when I try to update to gopls v0.3.1.

Error message:
vim-go: getting file for Identifier: no PackageHandles

gopls version:

golang.org/x/tools/gopls master golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=

cursor location is on New of the following code

	hubclient, err := client.New(hubconfig, client.Options{})

cursor location is at nssub

	if nssub.GetDefaultSubscriber() == nil {

@stamblerre
Copy link
Contributor

Can you share the output of gopls -rpc.trace -v check path/to/file.go? That will help to diagnose the issue.

@wzhan366
Copy link
Author

For reporting, I masked my home direct to <my_home>

gopls version:

golang.org/x/tools/gopls v0.3.1
    golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=

Error msg:

vim-go: no file for file:///<my_home>/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree

Cursor location is at the path variable besides the return

	path := make([][]int, 0)

	if root == nil {
		return path
	}

output of gopls trace:


2020/02/10 21:40:55 Info:2020/02/10 21:40:55 Build info
----------
golang.org/x/tools/gopls v0.3.1
    golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
    golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7 h1:hWZVyLW37WdETuLIGQMvQIhMfXXAOANmAIEAluZMy3c=
    golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=

Go info
-------
go version go1.13.6 darwin/amd64

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/<my_home>/Library/Caches/go-build"
GOENV="/<my_home>/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-ldflags=-compressdwarf=false"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/<my_home>/Documents/learngo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-build829456521=/tmp/go-build -gno-record-gcc-switches -fno-common"
gopls: getFile: file:///<my_home>/Documents/learngo/src/side_project_golang/leetcode400/tree: read /<my_home>/Documents/learngo/src/side_project_golang/leetcode400/tree: is a directory

whole sample code:

package leettree

import "fmt"

func pathSum(root *TreeNode, sum int) [][]int {
	path := make([][]int, 0)

	if root == nil {
		return path
	}

	var f func(*TreeNode, int, []int)

	f = func(t *TreeNode, v int, p []int) {
		fmt.Printf("incoming::::: v %v, p value %v, p pointer %p\n", v, p, p)

		if t == nil {
			return
		}

		if t.Left == nil && t.Right == nil && v == sum {
			// t := make([]int, len(p))
			// copy(t, p)
			fmt.Printf("copy to path ::::: v %v, p value %v, p pointer %p\n", v, p, p)
			// append over here, the p's content which is the underly array. later on the same one might be
			// changed by other recursion calls. Given this, the line benethe will have the risk that the
			// date will be override by other recursion calls
			//path = append(path, p)

			// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array
			// to make sure it won't get override

			//opt 1
			t := make([]int, len(p))
			copy(t, p)
			path = append(path, t)

			//opt 2
			// path = append(path, copyOnWrite(p))
		}

		if t.Left != nil {
			f(t.Left, v+t.Left.Val, append(p, t.Left.Val))
		}

		if t.Right != nil {
			f(t.Right, v+t.Right.Val, append(p, t.Right.Val))
		}

	}

	f(root, root.Val, []int{root.Val})

	return path
}

func copyOnWrite(origin []int) []int {
	var res []int
	res = append(res, origin...)
	return res
}

@wzhan366
Copy link
Author

Plus my work directory is:

/<my_home>/Documents/learngo/src/side_project_golang/leetcode400/tree

@stamblerre
Copy link
Contributor

Thanks for sharing this information! It looks like you passed a directory into gopls check rather than an individual Go file. Could you share the output when you run it on a single Go file?

@wzhan366
Copy link
Author

wzhan366 commented Feb 11, 2020

You are right, I was doing it on the whole directory, my bad.

Run: gopls -rpc.trace -v check 113pathSumII.go

2020/02/10 22:04:44 Info:2020/02/10 22:04:44 Build info
----------
golang.org/x/tools/gopls v0.3.1
    golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
    golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7 h1:hWZVyLW37WdETuLIGQMvQIhMfXXAOANmAIEAluZMy3c=
    golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=

Go info
-------
go version go1.13.6 darwin/amd64

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/<my_home>/Library/Caches/go-build"
GOENV="/<my_home>/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-ldflags=-compressdwarf=false"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/<my_home>/Documents/learngo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-build199280586=/tmp/go-build -gno-record-gcc-switches -fno-common"
2020/02/10 22:04:44 Info:2020/02/10 22:04:44 go/packages.Load
	snapshot = 0
	query = [./... builtin]
	packages = 2

@stamblerre
Copy link
Contributor

Thanks for sharing this. It looks like gopls check is working on the command line. Are you able to get your full gopls log from vim-go?

@wzhan366
Copy link
Author

Can you please let me know how to do that?

@stamblerre
Copy link
Contributor

I believe that, on a different issue, @bhcleek said it could be done by executing :let g:go_debug=['lsp'].

@wzhan366
Copy link
Author

When copying from the log to Github, I'm getting , anyway, here's the output from vim-go, please let me know if you need more data.

sent: Content-Length: 679
�
�{"method": "initialize", "jsonrpc": "2.0", "id": 1, "params": {"rootUri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree", "capabilities": {"workspace": {"workspaceFolders": true, "configuration": true, "didChangeConfiguration": {"dynamicRegistration": true}}, "textDocument": {"completion": {"completionItem": {"snippetSupport": false}}, "hover": {"contentFormat": ["plaintext"]}}}, "processId": 32271, "workspaceFolders": [{"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree", "name": "/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree"}]}}
received: Content-Length: 818
�
�{"jsonrpc":"2.0","result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{},"documentLinkProvider":{},"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["tidy"]},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":""}},"id":1}
sent: Content-Length: 57
�
�{"method": "initialized", "jsonrpc": "2.0", "params": {}}
sent: Content-Length: 1774
�
�{"method": "textDocument/didOpen", "jsonrpc": "2.0", "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 1, "languageId": "go", "text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}}}
stderr: 2020/02/10 23:05:21 debug server listening on port 60000
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"client/registerCapability","params":{"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]},"id":1}
sent: Content-Length: 43
�
�{"id": 1, "jsonrpc": "2.0", "result": null}
received: Content-Length: 422
�
�{"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree","section":"gopls"},{"scopeUri":"file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree","section":"gopls-/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree"}]},"id":2}
sent: Content-Length: 199
�
�{"id": 2, "jsonrpc": "2.0", "result": [{"completeUnimported": true, "buildFlags": [], "hoverKind": "NoDocumentation"}, {"completeUnimported": true, "buildFlags": [], "hoverKind": "NoDocumentation"}]}
received: Content-Length: 2143
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:21 Build info\n----------\ngolang.org/x/tools/gopls v0.3.1\n    golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=\n    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n    github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=\n    golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=\n    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=\n    golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7 h1:hWZVyLW37WdETuLIGQMvQIhMfXXAOANmAIEAluZMy3c=\n    golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=\n    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=\n    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=\n\nGo info\n-------\ngo version go1.13.6 darwin/amd64\n\nGO111MODULE=\"\"\nGOARCH=\"amd64\"\nGOBIN=\"\"\nGOCACHE=\"/Users/my_user@domain.com/Library/Caches/go-build\"\nGOENV=\"/Users/my_user@domain.com/Library/Application Support/go/env\"\nGOEXE=\"\"\nGOFLAGS=\"-ldflags=-compressdwarf=false\"\nGOHOSTARCH=\"amd64\"\nGOHOSTOS=\"darwin\"\nGONOPROXY=\"\"\nGONOSUMDB=\"\"\nGOOS=\"darwin\"\nGOPATH=\"/Users/my_user@domain.com/Documents/learngo\"\nGOPRIVATE=\"\"\nGOPROXY=\"https://proxy.golang.org,direct\"\nGOROOT=\"/usr/local/Cellar/go/1.13.6/libexec\"\nGOSUMDB=\"sum.golang.org\"\nGOTMPDIR=\"\"\nGOTOOLDIR=\"/usr/local/Cellar/go/1.13.6/libexec/pkg/tool/darwin_amd64\"\nGCCGO=\"gccgo\"\nAR=\"ar\"\nCC=\"clang\"\nCXX=\"clang++\"\nCGO_ENABLED=\"1\"\nGOMOD=\"\"\nCGO_CFLAGS=\"-g -O2\"\nCGO_CPPFLAGS=\"\"\nCGO_CXXFLAGS=\"-g -O2\"\nCGO_FFLAGS=\"-g -O2\"\nCGO_LDFLAGS=\"-g -O2\"\nPKG_CONFIG=\"pkg-config\"\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-build761857480=/tmp/go-build -gno-record-gcc-switches -fno-common\"\n"}}
received: Content-Length: 174
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:21 go/packages.Load\n\tsnapshot = 0\n\tquery = [./... builtin]\n\tpackages = 2"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:21 go/packages.Load\n\tsnapshot = 0\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:21 go/packages.Load\n\tsnapshot = 1\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:21 go/packages.Load\n\tsnapshot = 1\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:21 go/packages.Load\n\tsnapshot = 0\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 2}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 2, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:23 go/packages.Load\n\tsnapshot = 2\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:23 go/packages.Load\n\tsnapshot = 2\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:23 go/packages.Load\n\tsnapshot = 2\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:23 go/packages.Load\n\tsnapshot = 2\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":2}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 3}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 3, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:25 go/packages.Load\n\tsnapshot = 3\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:25 go/packages.Load\n\tsnapshot = 3\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":3}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:25 go/packages.Load\n\tsnapshot = 3\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:25 go/packages.Load\n\tsnapshot = 3\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 4}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 4, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:26 go/packages.Load\n\tsnapshot = 4\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":4}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:26 go/packages.Load\n\tsnapshot = 4\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:26 go/packages.Load\n\tsnapshot = 4\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:26 go/packages.Load\n\tsnapshot = 4\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 5}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 5, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:27 go/packages.Load\n\tsnapshot = 5\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:27 go/packages.Load\n\tsnapshot = 5\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:27 go/packages.Load\n\tsnapshot = 5\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":5}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:27 go/packages.Load\n\tsnapshot = 5\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 6}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 6, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:28 go/packages.Load\n\tsnapshot = 6\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:28 go/packages.Load\n\tsnapshot = 6\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":6}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:28 go/packages.Load\n\tsnapshot = 6\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:28 go/packages.Load\n\tsnapshot = 6\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 7}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 7, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:29 go/packages.Load\n\tsnapshot = 7\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":7}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:29 go/packages.Load\n\tsnapshot = 7\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:29 go/packages.Load\n\tsnapshot = 7\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:29 go/packages.Load\n\tsnapshot = 7\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 8}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 8, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:30 go/packages.Load\n\tsnapshot = 8\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":8}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:30 go/packages.Load\n\tsnapshot = 8\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:30 go/packages.Load\n\tsnapshot = 8\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:30 go/packages.Load\n\tsnapshot = 8\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 9}}}
sent: Content-Length: 256
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 9, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:32 go/packages.Load\n\tsnapshot = 9\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 87
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":9}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:32 go/packages.Load\n\tsnapshot = 9\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:32 go/packages.Load\n\tsnapshot = 9\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:32 go/packages.Load\n\tsnapshot = 9\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 10}}}
sent: Content-Length: 257
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 10, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:33 go/packages.Load\n\tsnapshot = 10\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 88
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":10}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:33 go/packages.Load\n\tsnapshot = 10\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:33 go/packages.Load\n\tsnapshot = 10\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:33 go/packages.Load\n\tsnapshot = 10\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 11}}}
sent: Content-Length: 257
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 11, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:34 go/packages.Load\n\tsnapshot = 11\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:34 go/packages.Load\n\tsnapshot = 11\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 88
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":11}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:34 go/packages.Load\n\tsnapshot = 11\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:34 go/packages.Load\n\tsnapshot = 11\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 12}}}
sent: Content-Length: 257
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 12, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 2, "line": 9}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:35 go/packages.Load\n\tsnapshot = 12\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 88
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no identifier found","data":null},"id":12}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:35 go/packages.Load\n\tsnapshot = 12\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:35 go/packages.Load\n\tsnapshot = 12\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:35 go/packages.Load\n\tsnapshot = 12\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 13}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 13, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 12, "line": 8}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:41 go/packages.Load\n\tsnapshot = 13\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:41 go/packages.Load\n\tsnapshot = 13\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":13}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:41 go/packages.Load\n\tsnapshot = 13\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:41 go/packages.Load\n\tsnapshot = 13\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 14}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 14, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 12, "line": 8}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:42 go/packages.Load\n\tsnapshot = 14\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:42 go/packages.Load\n\tsnapshot = 14\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:42 go/packages.Load\n\tsnapshot = 14\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:42 go/packages.Load\n\tsnapshot = 14\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":14}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 15}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 15, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 12, "line": 8}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:43 go/packages.Load\n\tsnapshot = 15\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:43 go/packages.Load\n\tsnapshot = 15\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:43 go/packages.Load\n\tsnapshot = 15\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:43 go/packages.Load\n\tsnapshot = 15\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":15}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 16}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 16, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 12, "line": 8}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:45 go/packages.Load\n\tsnapshot = 16\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:45 go/packages.Load\n\tsnapshot = 16\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":16}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:45 go/packages.Load\n\tsnapshot = 16\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:45 go/packages.Load\n\tsnapshot = 16\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 17}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 17, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 12, "line": 8}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:46 go/packages.Load\n\tsnapshot = 17\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:46 go/packages.Load\n\tsnapshot = 17\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:46 go/packages.Load\n\tsnapshot = 17\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:46 go/packages.Load\n\tsnapshot = 17\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":17}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 18}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 18, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 12, "line": 8}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:47 go/packages.Load\n\tsnapshot = 18\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:47 go/packages.Load\n\tsnapshot = 18\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:47 go/packages.Load\n\tsnapshot = 18\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:47 go/packages.Load\n\tsnapshot = 18\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":18}
sent: Content-Length: 1776
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path }\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 19}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 19, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 8}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:49 go/packages.Load\n\tsnapshot = 19\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:49 go/packages.Load\n\tsnapshot = 19\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:49 go/packages.Load\n\tsnapshot = 19\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:49 go/packages.Load\n\tsnapshot = 19\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":19}
sent: Content-Length: 1776
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path }\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 20}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 20, "params": {"textDocument": {"uri": "file:///Users/my_user%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 8}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:50 go/packages.Load\n\tsnapshot = 20\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:50 go/packages.Load\n\tsnapshot = 20\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 237
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"no file for file:///Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go in package side_project_golang/leetcode400/tree","data":null},"id":20}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:50 go/packages.Load\n\tsnapshot = 20\n\tquery = [file=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645

�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/10 23:05:50 go/packages.Load\n\tsnapshot = 20\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}

@bhcleek
Copy link
Collaborator

bhcleek commented Feb 11, 2020

@stamblerre the web interface is available to users by runnning :GoLSPDebugBrowser when gopls was started with debugging (i.e. with let g:go_debug=['lsp']), so if there's anything in the web ui that you need....

@stamblerre
Copy link
Contributor

Thanks for sharing the logs. I wonder if this is related to the @ in the filepath.
I've uploaded a change that will help debug this: https://go-review.googlesource.com/c/tools/+/219130.
You can try a version of gopls with this patch applied by following these steps:

$ git clone https://go.googlesource.com/tools
$ cd tools
$ git fetch "https://go.googlesource.com/tools" refs/changes/30/219130/1 && git cherry-pick FETCH_HEAD
$ cd gopls
$ go install

You will then have a version of gopls with this patch applied. Once you've done this, please follow up here if the issue has been fixed or the error message has more detail.

@wzhan366
Copy link
Author

@stamblerre thanks for the patch. Here's what I get after apply it.

Error message:

vim-go: getting file for Identifier: no PackageHandles

Output from gopls -rpc.trace -v check 113pathSumII.go

2020/02/11 20:18:22 Info:2020/02/11 20:18:22 Build info
----------
golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@(devel)
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
    golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20191017151554-a3bc800455d5 => ../
    golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=

Go info
-------
go version go1.13.6 darwin/amd64

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/my_user@domain.com/Library/Caches/go-build"
GOENV="/Users/my_user@domain.com/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-ldflags=-compressdwarf=false"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/my_user@domain.com/Documents/learngo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-build872260929=/tmp/go-build -gno-record-gcc-switches -fno-common"
2020/02/11 20:18:22 Info:2020/02/11 20:18:22 go/packages.Load
	snapshot = 0
	query = [./... builtin]
	packages = 2

Output from let g:go_debug=['lsp']

sent: Content-Length: 679
�
�{"method": "initialize", "jsonrpc": "2.0", "id": 1, "params": {"rootUri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree", "capabilities": {"workspace": {"workspaceFolders": true, "configuration": true, "didChangeConfiguration": {"dynamicRegistration": true}}, "textDocument": {"completion": {"completionItem": {"snippetSupport": false}}, "hover": {"contentFormat": ["plaintext"]}}}, "processId": 87960, "workspaceFolders": [{"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree", "name": "/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree"}]}}
received: Content-Length: 849
�
�{"jsonrpc":"2.0","result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["tidy"]},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":""}},"id":1}
sent: Content-Length: 57
�
�{"method": "initialized", "jsonrpc": "2.0", "params": {}}
sent: Content-Length: 1774
�
�{"method": "textDocument/didOpen", "jsonrpc": "2.0", "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 1, "languageId": "go", "text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}}}
stderr: 2020/02/11 20:21:10 debug server listening on port 64540
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"client/registerCapability","params":{"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]},"id":1}
sent: Content-Length: 43
�
�{"id": 1, "jsonrpc": "2.0", "result": null}
received: Content-Length: 422
�
�{"jsonrpc":"2.0","method":"workspace/configuration","params":{"items":[{"scopeUri":"file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree","section":"gopls"},{"scopeUri":"file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree","section":"gopls-/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree"}]},"id":2}
sent: Content-Length: 199
�
�{"id": 2, "jsonrpc": "2.0", "result": [{"completeUnimported": true, "buildFlags": [], "hoverKind": "NoDocumentation"}, {"completeUnimported": true, "buildFlags": [], "hoverKind": "NoDocumentation"}]}
received: Content-Length: 2060
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:11 Build info\n----------\ngolang.org/x/tools/gopls master\n    golang.org/x/tools/gopls@(devel)\n    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n    github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=\n    golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=\n    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=\n    golang.org/x/tools@v0.0.0-20191017151554-a3bc800455d5 =\u003e ../\n    golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=\n    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=\n    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=\n\nGo info\n-------\ngo version go1.13.6 darwin/amd64\n\nGO111MODULE=\"\"\nGOARCH=\"amd64\"\nGOBIN=\"\"\nGOCACHE=\"/Users/my_userg@domain.com/Library/Caches/go-build\"\nGOENV=\"/Users/my_userg@domain.com/Library/Application Support/go/env\"\nGOEXE=\"\"\nGOFLAGS=\"-ldflags=-compressdwarf=false\"\nGOHOSTARCH=\"amd64\"\nGOHOSTOS=\"darwin\"\nGONOPROXY=\"\"\nGONOSUMDB=\"\"\nGOOS=\"darwin\"\nGOPATH=\"/Users/my_userg@domain.com/Documents/learngo\"\nGOPRIVATE=\"\"\nGOPROXY=\"https://proxy.golang.org,direct\"\nGOROOT=\"/usr/local/Cellar/go/1.13.6/libexec\"\nGOSUMDB=\"sum.golang.org\"\nGOTMPDIR=\"\"\nGOTOOLDIR=\"/usr/local/Cellar/go/1.13.6/libexec/pkg/tool/darwin_amd64\"\nGCCGO=\"gccgo\"\nAR=\"ar\"\nCC=\"clang\"\nCXX=\"clang++\"\nCGO_ENABLED=\"1\"\nGOMOD=\"\"\nCGO_CFLAGS=\"-g -O2\"\nCGO_CPPFLAGS=\"\"\nCGO_CXXFLAGS=\"-g -O2\"\nCGO_FFLAGS=\"-g -O2\"\nCGO_LDFLAGS=\"-g -O2\"\nPKG_CONFIG=\"pkg-config\"\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-build727362361=/tmp/go-build -gno-record-gcc-switches -fno-common\"\n"}}
received: Content-Length: 174
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:11 go/packages.Load\n\tsnapshot = 0\n\tquery = [./... builtin]\n\tpackages = 2"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:11 go/packages.Load\n\tsnapshot = 0\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:11 go/packages.Load\n\tsnapshot = 0\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:11 go/packages.Load\n\tsnapshot = 1\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:11 go/packages.Load\n\tsnapshot = 1\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 2}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 2, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 34, "line": 11}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:14 go/packages.Load\n\tsnapshot = 2\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:14 go/packages.Load\n\tsnapshot = 2\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":2}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:14 go/packages.Load\n\tsnapshot = 2\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:14 go/packages.Load\n\tsnapshot = 2\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 3}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 3, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:17 go/packages.Load\n\tsnapshot = 3\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":3}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:17 go/packages.Load\n\tsnapshot = 3\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:17 go/packages.Load\n\tsnapshot = 3\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:17 go/packages.Load\n\tsnapshot = 3\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 4}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 4, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:18 go/packages.Load\n\tsnapshot = 4\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:18 go/packages.Load\n\tsnapshot = 4\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":4}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:18 go/packages.Load\n\tsnapshot = 4\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:18 go/packages.Load\n\tsnapshot = 4\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 5}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 5, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:19 go/packages.Load\n\tsnapshot = 5\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:19 go/packages.Load\n\tsnapshot = 5\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":5}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:19 go/packages.Load\n\tsnapshot = 5\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:19 go/packages.Load\n\tsnapshot = 5\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 6}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 6, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:20 go/packages.Load\n\tsnapshot = 6\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:20 go/packages.Load\n\tsnapshot = 6\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":6}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:20 go/packages.Load\n\tsnapshot = 6\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:20 go/packages.Load\n\tsnapshot = 6\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 7}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 7, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":7}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:21 go/packages.Load\n\tsnapshot = 7\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:21 go/packages.Load\n\tsnapshot = 7\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:21 go/packages.Load\n\tsnapshot = 7\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:21 go/packages.Load\n\tsnapshot = 7\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 8}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 8, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:23 go/packages.Load\n\tsnapshot = 8\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:23 go/packages.Load\n\tsnapshot = 8\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":8}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:23 go/packages.Load\n\tsnapshot = 8\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:23 go/packages.Load\n\tsnapshot = 8\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1778
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 9}}}
sent: Content-Length: 258
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 9, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:24 go/packages.Load\n\tsnapshot = 9\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 114
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":9}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:24 go/packages.Load\n\tsnapshot = 9\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 267
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:24 go/packages.Load\n\tsnapshot = 9\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 644
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:24 go/packages.Load\n\tsnapshot = 9\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 10}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 10, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:25 go/packages.Load\n\tsnapshot = 10\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:25 go/packages.Load\n\tsnapshot = 10\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":10}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:25 go/packages.Load\n\tsnapshot = 10\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:25 go/packages.Load\n\tsnapshot = 10\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 11}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 11, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":11}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:26 go/packages.Load\n\tsnapshot = 11\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:26 go/packages.Load\n\tsnapshot = 11\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:26 go/packages.Load\n\tsnapshot = 11\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:26 go/packages.Load\n\tsnapshot = 11\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 12}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 12, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:28 go/packages.Load\n\tsnapshot = 12\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:28 go/packages.Load\n\tsnapshot = 12\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":12}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:28 go/packages.Load\n\tsnapshot = 12\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:28 go/packages.Load\n\tsnapshot = 12\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 13}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 13, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:29 go/packages.Load\n\tsnapshot = 13\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:29 go/packages.Load\n\tsnapshot = 13\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":13}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:29 go/packages.Load\n\tsnapshot = 13\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:29 go/packages.Load\n\tsnapshot = 13\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 14}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 14, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:30 go/packages.Load\n\tsnapshot = 14\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":14}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:30 go/packages.Load\n\tsnapshot = 14\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:30 go/packages.Load\n\tsnapshot = 14\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:30 go/packages.Load\n\tsnapshot = 14\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 15}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 15, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:31 go/packages.Load\n\tsnapshot = 15\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:31 go/packages.Load\n\tsnapshot = 15\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":15}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:31 go/packages.Load\n\tsnapshot = 15\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:31 go/packages.Load\n\tsnapshot = 15\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 16}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 16, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":16}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:32 go/packages.Load\n\tsnapshot = 16\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:32 go/packages.Load\n\tsnapshot = 16\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:32 go/packages.Load\n\tsnapshot = 16\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:32 go/packages.Load\n\tsnapshot = 16\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 17}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 17, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":17}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:33 go/packages.Load\n\tsnapshot = 17\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:33 go/packages.Load\n\tsnapshot = 17\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:33 go/packages.Load\n\tsnapshot = 17\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:33 go/packages.Load\n\tsnapshot = 17\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 18}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 18, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:35 go/packages.Load\n\tsnapshot = 18\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":18}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:35 go/packages.Load\n\tsnapshot = 18\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:35 go/packages.Load\n\tsnapshot = 18\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:35 go/packages.Load\n\tsnapshot = 18\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 19}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 19, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:36 go/packages.Load\n\tsnapshot = 19\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:36 go/packages.Load\n\tsnapshot = 19\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:36 go/packages.Load\n\tsnapshot = 19\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:36 go/packages.Load\n\tsnapshot = 19\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":19}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 20}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 20, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:37 go/packages.Load\n\tsnapshot = 20\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:37 go/packages.Load\n\tsnapshot = 20\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":20}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:37 go/packages.Load\n\tsnapshot = 20\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:37 go/packages.Load\n\tsnapshot = 20\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 21}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 21, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:38 go/packages.Load\n\tsnapshot = 21\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:38 go/packages.Load\n\tsnapshot = 21\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:38 go/packages.Load\n\tsnapshot = 21\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":21}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:38 go/packages.Load\n\tsnapshot = 21\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 22}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 22, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:39 go/packages.Load\n\tsnapshot = 22\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":22}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:39 go/packages.Load\n\tsnapshot = 22\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:39 go/packages.Load\n\tsnapshot = 22\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:39 go/packages.Load\n\tsnapshot = 22\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 23}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 23, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:41 go/packages.Load\n\tsnapshot = 23\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:41 go/packages.Load\n\tsnapshot = 23\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":23}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:41 go/packages.Load\n\tsnapshot = 23\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:41 go/packages.Load\n\tsnapshot = 23\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 24}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 24, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:42 go/packages.Load\n\tsnapshot = 24\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:42 go/packages.Load\n\tsnapshot = 24\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":24}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:42 go/packages.Load\n\tsnapshot = 24\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:42 go/packages.Load\n\tsnapshot = 24\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 25}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 25, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:43 go/packages.Load\n\tsnapshot = 25\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:43 go/packages.Load\n\tsnapshot = 25\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":25}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:43 go/packages.Load\n\tsnapshot = 25\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:43 go/packages.Load\n\tsnapshot = 25\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 26}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 26, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:44 go/packages.Load\n\tsnapshot = 26\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:44 go/packages.Load\n\tsnapshot = 26\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":26}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:44 go/packages.Load\n\tsnapshot = 26\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:44 go/packages.Load\n\tsnapshot = 26\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 27}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 27, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:45 go/packages.Load\n\tsnapshot = 27\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:45 go/packages.Load\n\tsnapshot = 27\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:45 go/packages.Load\n\tsnapshot = 27\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":27}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:45 go/packages.Load\n\tsnapshot = 27\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 28}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 28, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:47 go/packages.Load\n\tsnapshot = 28\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":28}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:47 go/packages.Load\n\tsnapshot = 28\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:47 go/packages.Load\n\tsnapshot = 28\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:47 go/packages.Load\n\tsnapshot = 28\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 29}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 29, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:48 go/packages.Load\n\tsnapshot = 29\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:48 go/packages.Load\n\tsnapshot = 29\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":29}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:48 go/packages.Load\n\tsnapshot = 29\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:48 go/packages.Load\n\tsnapshot = 29\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 30}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 30, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":30}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:49 go/packages.Load\n\tsnapshot = 30\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:49 go/packages.Load\n\tsnapshot = 30\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:49 go/packages.Load\n\tsnapshot = 30\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:49 go/packages.Load\n\tsnapshot = 30\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 31}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 31, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":31}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:50 go/packages.Load\n\tsnapshot = 31\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:50 go/packages.Load\n\tsnapshot = 31\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:50 go/packages.Load\n\tsnapshot = 31\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:50 go/packages.Load\n\tsnapshot = 31\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 32}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 32, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:51 go/packages.Load\n\tsnapshot = 32\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":32}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:51 go/packages.Load\n\tsnapshot = 32\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:51 go/packages.Load\n\tsnapshot = 32\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:51 go/packages.Load\n\tsnapshot = 32\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 33}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 33, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":33}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:52 go/packages.Load\n\tsnapshot = 33\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:52 go/packages.Load\n\tsnapshot = 33\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:52 go/packages.Load\n\tsnapshot = 33\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:52 go/packages.Load\n\tsnapshot = 33\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 34}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 34, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":34}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:53 go/packages.Load\n\tsnapshot = 34\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:53 go/packages.Load\n\tsnapshot = 34\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:53 go/packages.Load\n\tsnapshot = 34\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:53 go/packages.Load\n\tsnapshot = 34\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 35}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 35, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:55 go/packages.Load\n\tsnapshot = 35\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:55 go/packages.Load\n\tsnapshot = 35\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":35}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:55 go/packages.Load\n\tsnapshot = 35\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:55 go/packages.Load\n\tsnapshot = 35\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 36}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 36, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":36}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:56 go/packages.Load\n\tsnapshot = 36\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:56 go/packages.Load\n\tsnapshot = 36\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:56 go/packages.Load\n\tsnapshot = 36\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:56 go/packages.Load\n\tsnapshot = 36\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 37}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 37, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:57 go/packages.Load\n\tsnapshot = 37\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:57 go/packages.Load\n\tsnapshot = 37\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":37}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:57 go/packages.Load\n\tsnapshot = 37\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:57 go/packages.Load\n\tsnapshot = 37\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 38}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 38, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":38}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:58 go/packages.Load\n\tsnapshot = 38\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:58 go/packages.Load\n\tsnapshot = 38\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:58 go/packages.Load\n\tsnapshot = 38\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:58 go/packages.Load\n\tsnapshot = 38\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 39}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 39, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:59 go/packages.Load\n\tsnapshot = 39\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:59 go/packages.Load\n\tsnapshot = 39\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":39}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:59 go/packages.Load\n\tsnapshot = 39\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:21:59 go/packages.Load\n\tsnapshot = 39\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
sent: Content-Length: 1779
�
�{"method": "textDocument/didChange", "jsonrpc": "2.0", "params": {"contentChanges": [{"text": "package leettree\n\nimport \"fmt\"\n\nfunc pathSum(root *TreeNode, sum int) [][]int {\n\tpath := make([][]int, 0)\n\n\tif root == nil {\n\t\treturn path\n\t}\n\n\tvar f func(*TreeNode, int, []int)\n\n\tf = func(t *TreeNode, v int, p []int) {\n\t\tfmt.Printf(\"incoming::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\n\t\tif t == nil {\n\t\t\treturn\n\t\t}\n\n\t\tif t.Left == nil && t.Right == nil && v == sum {\n\t\t\t// t := make([]int, len(p))\n\t\t\t// copy(t, p)\n\t\t\tfmt.Printf(\"copy to path ::::: v %v, p value %v, p pointer %p\\n\", v, p, p)\n\t\t\t// append over here, the p's content which is the underly array. later on the same one might be\n\t\t\t// changed by other recursion calls. Given this, the line benethe will have the risk that the\n\t\t\t// date will be override by other recursion calls\n\t\t\t//path = append(path, p)\n\n\t\t\t// to avoid this, we can do a copy or call the copyOnWrite() func to create a new underline array\n\t\t\t// to make sure it won't get override\n\n\t\t\t//opt 1\n\t\t\tt := make([]int, len(p))\n\t\t\tcopy(t, p)\n\t\t\tpath = append(path, t)\n\n\t\t\t//opt 2\n\t\t\t// path = append(path, copyOnWrite(p))\n\t\t}\n\n\t\tif t.Left != nil {\n\t\t\tf(t.Left, v+t.Left.Val, append(p, t.Left.Val))\n\t\t}\n\n\t\tif t.Right != nil {\n\t\t\tf(t.Right, v+t.Right.Val, append(p, t.Right.Val))\n\t\t}\n\n\t}\n\n\tf(root, root.Val, []int{root.Val})\n\n\treturn path\n}\n\nfunc copyOnWrite(origin []int) []int {\n\tvar res []int\n\tres = append(res, origin...)\n\treturn res\n}\n"}], "textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go", "version": 40}}}
sent: Content-Length: 259
�
�{"method": "textDocument/definition", "jsonrpc": "2.0", "id": 40, "params": {"textDocument": {"uri": "file:///Users/my_userg%40domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go"}, "position": {"character": 13, "line": 11}}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:22:00 go/packages.Load\n\tsnapshot = 40\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 268
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:22:00 go/packages.Load\n\tsnapshot = 40\n\tquery = [file=/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go]\n\tpackages = 1"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:22:00 go/packages.Load\n\tsnapshot = 40\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 645
�
�{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"2020/02/11 20:22:00 go/packages.Load\n\tsnapshot = 40\n\tpackage = side_project_golang/leetcode400/tree\n\tfiles = [/Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_userg@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]"}}
received: Content-Length: 115
�
�{"jsonrpc":"2.0","error":{"code":0,"message":"getting file for Identifier: no PackageHandles","data":null},"id":40}

@wzhan366
Copy link
Author

FYI:

I don't have this issue when I'm on gopls v0.3.0

golang.org/x/tools/gopls v0.3.0
    golang.org/x/tools/gopls@v0.3.0 h1:l9KKK1/n6CIbfgaUvHBWAvCfOxcl1N+KSOK79OlPIao=

@stamblerre
Copy link
Contributor

We just released gopls/v0.3.2 - could you give that a try?
Also, can you share the output of gopls -rpc.trace -v query definition path/to/file.go:<line>:<col> for the definition request that causes this failure?

@wzhan366
Copy link
Author

@stamblerre thanks for the follow-up,

Unfortunately, it's still not working for me on v0.3.2.

here's what get from trace command, on gopls v0.3.2

2020/02/13 19:57:35 Info:2020/02/13 19:57:35 Build info
----------
golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@v0.3.2 h1:eP1aj1AvT6ynElQH6KP0mmOT2gnWa1gYclHL4wGUbMo=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
    golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
    golang.org/x/tools@v0.0.0-20200213224642-88e652f7a869 h1:DPqS0AlgYBVHhG5jnEVScBXXIS+xjgn7O8s1E3sDqxc=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=

Go info
-------
go version go1.13.8 darwin/amd64

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/my_user@domain.com/Library/Caches/go-build"
GOENV="/Users/my_user@domain.com/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-ldflags=-compressdwarf=false"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/my_user@domain.com/Documents/learngo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.8/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.8/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-build721146008=/tmp/go-build -gno-record-gcc-switches -fno-common"
2020/02/13 19:57:35 Info:2020/02/13 19:57:35 go/packages.Load
	snapshot = 0
	query = [./... builtin]
	packages = 2
gopls: /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go:14:5: no identifier found

For your comparison, here's the trace I got on gopls v0.2.2


2020/02/13 19:52:35 Info:2020/02/13 19:52:35 Build info
----------
golang.org/x/tools/gopls 0.2.2
    golang.org/x/tools/gopls@v0.2.2 h1:ujGisyytgY1VGcmd66wIJ9+wVAfmodXj6daHM43HRXk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
    golang.org/x/tools@v0.0.0-20191206201009-952e2c076240 h1:metzFnqcC0vUPmZX4El8bICiQU9hieZ3L9dXAitxVXQ=
    golang.org/x/xerrors@v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
    honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=

Go info
-------
go version go1.13.8 darwin/amd64

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/my_user@domain.com/Library/Caches/go-build"
GOENV="/Users/my_user@domain.com/Library/Application Support/go/env"
GOEXE=""
GOFLAGS="-ldflags=-compressdwarf=false"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/my_user@domain.com/Documents/learngo"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.8/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.8/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/q4/q7jfqfmd6bqd2nrx2ntt7m0m0000gn/T/go-build588763911=/tmp/go-build -gno-record-gcc-switches -fno-common"
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 15.812093ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "list" "-m" "-json" "all", stderr: <<go list -m: not using modules
>> stdout: <<>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 17.310853ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "env" "GOMOD", stderr: <<>> stdout: <<
>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 20.638416ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "builtin", stderr: <<>> stdout: <<{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/builtin",
	"ImportPath": "builtin",
	"Name": "builtin",
	"Doc": "Package builtin provides documentation for Go's predeclared identifiers.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/builtin.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Match": [
		"builtin"
	],
	"Goroot": true,
	"Standard": true,
	"GoFiles": [
		"builtin.go"
	]
}
>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 12.087628ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "env" "GOPATH", stderr: <<>> stdout: <</Users/my_user@domain.com/Documents/learngo
>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 20.718457ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "env" "GOMOD", stderr: <<>> stdout: <<
>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 20.276016ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "list" "-m" "-json" "all", stderr: <<go list -m: not using modules
>> stdout: <<>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 15.46302ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "env" "GOPATH", stderr: <<>> stdout: <</Users/my_user@domain.com/Documents/learngo
>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 207.277407ms for GOROOT=/usr/local/Cellar/go/1.13.8/libexec GOPATH=/Users/my_user@domain.com/Documents/learngo GO111MODULE= PWD=/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree", stderr: <<>> stdout: <<{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/cpu",
	"ImportPath": "internal/cpu",
	"Name": "cpu",
	"Doc": "Package cpu implements processor feature detection used by the Go standard library.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/cpu.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"cpu.go",
		"cpu_amd64.go",
		"cpu_x86.go"
	],
	"CompiledGoFiles": [
		"cpu.go",
		"cpu_amd64.go",
		"cpu_x86.go",
		"cpu_x86.s"
	],
	"IgnoredGoFiles": [
		"cpu_386.go",
		"cpu_amd64p32.go",
		"cpu_arm.go",
		"cpu_arm64.go",
		"cpu_mips.go",
		"cpu_mips64.go",
		"cpu_mips64le.go",
		"cpu_mipsle.go",
		"cpu_no_init.go",
		"cpu_ppc64x.go",
		"cpu_s390x.go",
		"cpu_s390x_test.go",
		"cpu_wasm.go"
	],
	"SFiles": [
		"cpu_x86.s"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"XTestGoFiles": [
		"cpu_test.go",
		"cpu_x86_test.go"
	],
	"XTestImports": [
		"internal/cpu",
		"internal/testenv",
		"os",
		"os/exec",
		"runtime",
		"strings",
		"testing"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/unsafe",
	"ImportPath": "unsafe",
	"Name": "unsafe",
	"Doc": "Package unsafe contains operations that step around the type safety of Go programs.",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"unsafe.go"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/bytealg",
	"ImportPath": "internal/bytealg",
	"Name": "bytealg",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/bytealg.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"bytealg.go",
		"compare_native.go",
		"count_native.go",
		"equal_generic.go",
		"equal_native.go",
		"index_amd64.go",
		"index_native.go",
		"indexbyte_native.go"
	],
	"CompiledGoFiles": [
		"bytealg.go",
		"compare_native.go",
		"count_native.go",
		"equal_generic.go",
		"equal_native.go",
		"index_amd64.go",
		"index_native.go",
		"indexbyte_native.go",
		"compare_amd64.s",
		"count_amd64.s",
		"equal_amd64.s",
		"index_amd64.s",
		"indexbyte_amd64.s"
	],
	"IgnoredGoFiles": [
		"compare_generic.go",
		"count_generic.go",
		"index_arm64.go",
		"index_generic.go",
		"index_s390x.go",
		"indexbyte_generic.go"
	],
	"SFiles": [
		"compare_amd64.s",
		"count_amd64.s",
		"equal_amd64.s",
		"index_amd64.s",
		"indexbyte_amd64.s"
	],
	"Imports": [
		"internal/cpu",
		"unsafe"
	],
	"Deps": [
		"internal/cpu",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/runtime/internal/atomic",
	"ImportPath": "runtime/internal/atomic",
	"Name": "atomic",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/runtime/internal/atomic.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"atomic_amd64x.go",
		"stubs.go"
	],
	"CompiledGoFiles": [
		"atomic_amd64x.go",
		"stubs.go",
		"asm_amd64.s"
	],
	"IgnoredGoFiles": [
		"atomic_386.go",
		"atomic_arm.go",
		"atomic_arm64.go",
		"atomic_mips64x.go",
		"atomic_mipsx.go",
		"atomic_ppc64x.go",
		"atomic_s390x.go",
		"atomic_wasm.go"
	],
	"SFiles": [
		"asm_amd64.s"
	],
	"Imports": [
		"unsafe"
	],
	"Deps": [
		"unsafe"
	],
	"XTestGoFiles": [
		"atomic_test.go",
		"bench_test.go"
	],
	"XTestImports": [
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/sys",
		"testing",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/runtime/internal/sys",
	"ImportPath": "runtime/internal/sys",
	"Name": "sys",
	"Doc": "package sys contains system- and configuration- and architecture-specific constants used by the runtime.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/runtime/internal/sys.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"arch.go",
		"arch_amd64.go",
		"intrinsics.go",
		"stubs.go",
		"sys.go",
		"zgoarch_amd64.go",
		"zgoos_darwin.go",
		"zversion.go"
	],
	"CompiledGoFiles": [
		"arch.go",
		"arch_amd64.go",
		"intrinsics.go",
		"stubs.go",
		"sys.go",
		"zgoarch_amd64.go",
		"zgoos_darwin.go",
		"zversion.go"
	],
	"IgnoredGoFiles": [
		"arch_386.go",
		"arch_amd64p32.go",
		"arch_arm.go",
		"arch_arm64.go",
		"arch_mips.go",
		"arch_mips64.go",
		"arch_mips64le.go",
		"arch_mipsle.go",
		"arch_ppc64.go",
		"arch_ppc64le.go",
		"arch_s390x.go",
		"arch_wasm.go",
		"gengoos.go",
		"intrinsics_stubs.go",
		"zgoarch_386.go",
		"zgoarch_amd64p32.go",
		"zgoarch_arm.go",
		"zgoarch_arm64.go",
		"zgoarch_arm64be.go",
		"zgoarch_armbe.go",
		"zgoarch_mips.go",
		"zgoarch_mips64.go",
		"zgoarch_mips64le.go",
		"zgoarch_mips64p32.go",
		"zgoarch_mips64p32le.go",
		"zgoarch_mipsle.go",
		"zgoarch_ppc.go",
		"zgoarch_ppc64.go",
		"zgoarch_ppc64le.go",
		"zgoarch_riscv.go",
		"zgoarch_riscv64.go",
		"zgoarch_s390.go",
		"zgoarch_s390x.go",
		"zgoarch_sparc.go",
		"zgoarch_sparc64.go",
		"zgoarch_wasm.go",
		"zgoos_aix.go",
		"zgoos_android.go",
		"zgoos_dragonfly.go",
		"zgoos_freebsd.go",
		"zgoos_hurd.go",
		"zgoos_illumos.go",
		"zgoos_js.go",
		"zgoos_linux.go",
		"zgoos_nacl.go",
		"zgoos_netbsd.go",
		"zgoos_openbsd.go",
		"zgoos_plan9.go",
		"zgoos_solaris.go",
		"zgoos_windows.go",
		"zgoos_zos.go"
	],
	"XTestGoFiles": [
		"intrinsics_test.go"
	],
	"XTestImports": [
		"runtime/internal/sys",
		"testing"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/runtime/internal/math",
	"ImportPath": "runtime/internal/math",
	"Name": "math",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/runtime/internal/math.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"math.go"
	],
	"CompiledGoFiles": [
		"math.go"
	],
	"Imports": [
		"runtime/internal/sys"
	],
	"Deps": [
		"runtime/internal/sys"
	],
	"XTestGoFiles": [
		"math_test.go"
	],
	"XTestImports": [
		"runtime/internal/math",
		"testing"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/runtime",
	"ImportPath": "runtime",
	"Name": "runtime",
	"Doc": "Package runtime contains operations that interact with Go's runtime system, such as functions to control goroutines.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/runtime.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"alg.go",
		"atomic_pointer.go",
		"cgo.go",
		"cgocall.go",
		"cgocallback.go",
		"cgocheck.go",
		"chan.go",
		"compiler.go",
		"complex.go",
		"cpuflags.go",
		"cpuflags_amd64.go",
		"cpuprof.go",
		"cputicks.go",
		"debug.go",
		"debugcall.go",
		"debuglog.go",
		"debuglog_off.go",
		"defs_darwin_amd64.go",
		"env_posix.go",
		"error.go",
		"extern.go",
		"fastlog2.go",
		"fastlog2table.go",
		"float.go",
		"hash64.go",
		"heapdump.go",
		"iface.go",
		"lfstack.go",
		"lfstack_64bit.go",
		"lock_sema.go",
		"malloc.go",
		"map.go",
		"map_fast32.go",
		"map_fast64.go",
		"map_faststr.go",
		"mbarrier.go",
		"mbitmap.go",
		"mcache.go",
		"mcentral.go",
		"mem_darwin.go",
		"mfinal.go",
		"mfixalloc.go",
		"mgc.go",
		"mgclarge.go",
		"mgcmark.go",
		"mgcscavenge.go",
		"mgcstack.go",
		"mgcsweep.go",
		"mgcsweepbuf.go",
		"mgcwork.go",
		"mheap.go",
		"mprof.go",
		"msan0.go",
		"msize.go",
		"mstats.go",
		"mwbbuf.go",
		"netpoll.go",
		"netpoll_kqueue.go",
		"os_darwin.go",
		"os_nonopenbsd.go",
		"panic.go",
		"plugin.go",
		"print.go",
		"proc.go",
		"profbuf.go",
		"proflabel.go",
		"race0.go",
		"rdebug.go",
		"relax_stub.go",
		"runtime.go",
		"runtime1.go",
		"runtime2.go",
		"rwmutex.go",
		"select.go",
		"sema.go",
		"signal_amd64x.go",
		"signal_darwin.go",
		"signal_darwin_amd64.go",
		"signal_sighandler.go",
		"signal_unix.go",
		"sigqueue.go",
		"sizeclasses.go",
		"slice.go",
		"softfloat64.go",
		"stack.go",
		"string.go",
		"stubs.go",
		"stubs_amd64x.go",
		"stubs_nonlinux.go",
		"symtab.go",
		"sys_darwin.go",
		"sys_darwin_64.go",
		"sys_nonppc64x.go",
		"sys_x86.go",
		"time.go",
		"timestub.go",
		"trace.go",
		"traceback.go",
		"type.go",
		"typekind.go",
		"utf8.go",
		"vdso_in_none.go",
		"write_err.go"
	],
	"CompiledGoFiles": [
		"alg.go",
		"atomic_pointer.go",
		"cgo.go",
		"cgocall.go",
		"cgocallback.go",
		"cgocheck.go",
		"chan.go",
		"compiler.go",
		"complex.go",
		"cpuflags.go",
		"cpuflags_amd64.go",
		"cpuprof.go",
		"cputicks.go",
		"debug.go",
		"debugcall.go",
		"debuglog.go",
		"debuglog_off.go",
		"defs_darwin_amd64.go",
		"env_posix.go",
		"error.go",
		"extern.go",
		"fastlog2.go",
		"fastlog2table.go",
		"float.go",
		"hash64.go",
		"heapdump.go",
		"iface.go",
		"lfstack.go",
		"lfstack_64bit.go",
		"lock_sema.go",
		"malloc.go",
		"map.go",
		"map_fast32.go",
		"map_fast64.go",
		"map_faststr.go",
		"mbarrier.go",
		"mbitmap.go",
		"mcache.go",
		"mcentral.go",
		"mem_darwin.go",
		"mfinal.go",
		"mfixalloc.go",
		"mgc.go",
		"mgclarge.go",
		"mgcmark.go",
		"mgcscavenge.go",
		"mgcstack.go",
		"mgcsweep.go",
		"mgcsweepbuf.go",
		"mgcwork.go",
		"mheap.go",
		"mprof.go",
		"msan0.go",
		"msize.go",
		"mstats.go",
		"mwbbuf.go",
		"netpoll.go",
		"netpoll_kqueue.go",
		"os_darwin.go",
		"os_nonopenbsd.go",
		"panic.go",
		"plugin.go",
		"print.go",
		"proc.go",
		"profbuf.go",
		"proflabel.go",
		"race0.go",
		"rdebug.go",
		"relax_stub.go",
		"runtime.go",
		"runtime1.go",
		"runtime2.go",
		"rwmutex.go",
		"select.go",
		"sema.go",
		"signal_amd64x.go",
		"signal_darwin.go",
		"signal_darwin_amd64.go",
		"signal_sighandler.go",
		"signal_unix.go",
		"sigqueue.go",
		"sizeclasses.go",
		"slice.go",
		"softfloat64.go",
		"stack.go",
		"string.go",
		"stubs.go",
		"stubs_amd64x.go",
		"stubs_nonlinux.go",
		"symtab.go",
		"sys_darwin.go",
		"sys_darwin_64.go",
		"sys_nonppc64x.go",
		"sys_x86.go",
		"time.go",
		"timestub.go",
		"trace.go",
		"traceback.go",
		"type.go",
		"typekind.go",
		"utf8.go",
		"vdso_in_none.go",
		"write_err.go",
		"asm.s",
		"asm_amd64.s",
		"duff_amd64.s",
		"memclr_amd64.s",
		"memmove_amd64.s",
		"rt0_darwin_amd64.s",
		"sys_darwin_amd64.s"
	],
	"IgnoredGoFiles": [
		"auxv_none.go",
		"cgo_mmap.go",
		"cgo_ppc64x.go",
		"cgo_sigaction.go",
		"crash_nonunix_test.go",
		"debug_test.go",
		"debuglog_on.go",
		"defs1_linux.go",
		"defs1_netbsd_386.go",
		"defs1_netbsd_amd64.go",
		"defs1_netbsd_arm.go",
		"defs1_netbsd_arm64.go",
		"defs1_solaris_amd64.go",
		"defs2_linux.go",
		"defs3_linux.go",
		"defs_aix.go",
		"defs_aix_ppc64.go",
		"defs_arm_linux.go",
		"defs_darwin.go",
		"defs_darwin_386.go",
		"defs_darwin_arm.go",
		"defs_darwin_arm64.go",
		"defs_dragonfly.go",
		"defs_dragonfly_amd64.go",
		"defs_freebsd.go",
		"defs_freebsd_386.go",
		"defs_freebsd_amd64.go",
		"defs_freebsd_arm.go",
		"defs_linux.go",
		"defs_linux_386.go",
		"defs_linux_amd64.go",
		"defs_linux_arm.go",
		"defs_linux_arm64.go",
		"defs_linux_mips64x.go",
		"defs_linux_mipsx.go",
		"defs_linux_ppc64.go",
		"defs_linux_ppc64le.go",
		"defs_linux_s390x.go",
		"defs_nacl_386.go",
		"defs_nacl_amd64p32.go",
		"defs_nacl_arm.go",
		"defs_netbsd.go",
		"defs_netbsd_386.go",
		"defs_netbsd_amd64.go",
		"defs_netbsd_arm.go",
		"defs_openbsd.go",
		"defs_openbsd_386.go",
		"defs_openbsd_amd64.go",
		"defs_openbsd_arm.go",
		"defs_openbsd_arm64.go",
		"defs_plan9_386.go",
		"defs_plan9_amd64.go",
		"defs_plan9_arm.go",
		"defs_solaris.go",
		"defs_solaris_amd64.go",
		"defs_windows.go",
		"defs_windows_386.go",
		"defs_windows_amd64.go",
		"defs_windows_arm.go",
		"env_plan9.go",
		"export_arm_test.go",
		"export_debug_test.go",
		"export_futex_test.go",
		"export_linux_test.go",
		"export_windows_test.go",
		"futex_test.go",
		"hash32.go",
		"lfstack_32bit.go",
		"lock_futex.go",
		"lock_js.go",
		"mem_aix.go",
		"mem_bsd.go",
		"mem_js.go",
		"mem_linux.go",
		"mem_plan9.go",
		"mem_windows.go",
		"memmove_linux_amd64_test.go",
		"mkduff.go",
		"mkfastlog2table.go",
		"mksizeclasses.go",
		"mmap.go",
		"msan.go",
		"net_plan9.go",
		"netpoll_aix.go",
		"netpoll_epoll.go",
		"netpoll_fake.go",
		"netpoll_solaris.go",
		"netpoll_stub.go",
		"netpoll_windows.go",
		"norace_linux_test.go",
		"numcpu_freebsd_test.go",
		"os2_aix.go",
		"os2_freebsd.go",
		"os2_nacl.go",
		"os2_openbsd.go",
		"os2_plan9.go",
		"os2_solaris.go",
		"os3_plan9.go",
		"os3_solaris.go",
		"os_aix.go",
		"os_android.go",
		"os_darwin_arm.go",
		"os_darwin_arm64.go",
		"os_dragonfly.go",
		"os_freebsd.go",
		"os_freebsd2.go",
		"os_freebsd_amd64.go",
		"os_freebsd_arm.go",
		"os_freebsd_noauxv.go",
		"os_js.go",
		"os_linux.go",
		"os_linux_arm.go",
		"os_linux_arm64.go",
		"os_linux_be64.go",
		"os_linux_generic.go",
		"os_linux_mips64x.go",
		"os_linux_mipsx.go",
		"os_linux_noauxv.go",
		"os_linux_novdso.go",
		"os_linux_ppc64x.go",
		"os_linux_s390x.go",
		"os_nacl.go",
		"os_nacl_arm.go",
		"os_netbsd.go",
		"os_netbsd_386.go",
		"os_netbsd_amd64.go",
		"os_netbsd_arm.go",
		"os_netbsd_arm64.go",
		"os_openbsd.go",
		"os_openbsd_arm.go",
		"os_openbsd_arm64.go",
		"os_plan9.go",
		"os_plan9_arm.go",
		"os_solaris.go",
		"os_windows.go",
		"os_windows_arm.go",
		"panic32.go",
		"race.go",
		"runtime_linux_test.go",
		"sigaction.go",
		"signal_386.go",
		"signal_aix_ppc64.go",
		"signal_arm.go",
		"signal_arm64.go",
		"signal_darwin_386.go",
		"signal_darwin_arm.go",
		"signal_darwin_arm64.go",
		"signal_dragonfly.go",
		"signal_dragonfly_amd64.go",
		"signal_freebsd.go",
		"signal_freebsd_386.go",
		"signal_freebsd_amd64.go",
		"signal_freebsd_arm.go",
		"signal_linux_386.go",
		"signal_linux_amd64.go",
		"signal_linux_arm.go",
		"signal_linux_arm64.go",
		"signal_linux_mips64x.go",
		"signal_linux_mipsx.go",
		"signal_linux_ppc64x.go",
		"signal_linux_s390x.go",
		"signal_mips64x.go",
		"signal_mipsx.go",
		"signal_nacl.go",
		"signal_nacl_386.go",
		"signal_nacl_amd64p32.go",
		"signal_nacl_arm.go",
		"signal_netbsd.go",
		"signal_netbsd_386.go",
		"signal_netbsd_amd64.go",
		"signal_netbsd_arm.go",
		"signal_netbsd_arm64.go",
		"signal_openbsd.go",
		"signal_openbsd_386.go",
		"signal_openbsd_amd64.go",
		"signal_openbsd_arm.go",
		"signal_openbsd_arm64.go",
		"signal_plan9.go",
		"signal_ppc64x.go",
		"signal_solaris.go",
		"signal_solaris_amd64.go",
		"signal_windows.go",
		"sigqueue_note.go",
		"sigqueue_plan9.go",
		"sigtab_aix.go",
		"sigtab_linux_generic.go",
		"sigtab_linux_mipsx.go",
		"stubs2.go",
		"stubs3.go",
		"stubs32.go",
		"stubs_386.go",
		"stubs_arm.go",
		"stubs_arm64.go",
		"stubs_linux.go",
		"stubs_mips64x.go",
		"stubs_mipsx.go",
		"stubs_ppc64x.go",
		"stubs_s390x.go",
		"sys_arm.go",
		"sys_arm64.go",
		"sys_darwin_32.go",
		"sys_mips64x.go",
		"sys_mipsx.go",
		"sys_ppc64x.go",
		"sys_s390x.go",
		"sys_wasm.go",
		"syscall2_solaris.go",
		"syscall_aix.go",
		"syscall_solaris.go",
		"syscall_windows.go",
		"syscall_windows_test.go",
		"timeasm.go",
		"timestub2.go",
		"vdso_elf32.go",
		"vdso_elf64.go",
		"vdso_freebsd.go",
		"vdso_freebsd_arm.go",
		"vdso_freebsd_x86.go",
		"vdso_linux.go",
		"vdso_linux_386.go",
		"vdso_linux_amd64.go",
		"vdso_linux_arm.go",
		"vdso_linux_arm64.go",
		"vdso_linux_ppc64x.go",
		"vlop_arm_test.go",
		"vlrt.go",
		"wincallback.go",
		"write_err_android.go",
		"zcallback_windows.go"
	],
	"HFiles": [
		"asm_ppc64x.h",
		"funcdata.h",
		"go_tls.h",
		"textflag.h"
	],
	"SFiles": [
		"asm.s",
		"asm_amd64.s",
		"duff_amd64.s",
		"memclr_amd64.s",
		"memmove_amd64.s",
		"rt0_darwin_amd64.s",
		"sys_darwin_amd64.s"
	],
	"Imports": [
		"internal/bytealg",
		"internal/cpu",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"unsafe"
	],
	"Deps": [
		"internal/bytealg",
		"internal/cpu",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"unsafe"
	],
	"TestGoFiles": [
		"export_debuglog_test.go",
		"export_mmap_test.go",
		"export_test.go",
		"export_unix_test.go",
		"proc_runtime_test.go"
	],
	"TestImports": [
		"runtime/internal/atomic",
		"runtime/internal/sys",
		"unsafe"
	],
	"XTestGoFiles": [
		"callers_test.go",
		"chan_test.go",
		"chanbarrier_test.go",
		"closure_test.go",
		"complex_test.go",
		"crash_cgo_test.go",
		"crash_test.go",
		"crash_unix_test.go",
		"debuglog_test.go",
		"env_test.go",
		"example_test.go",
		"fastlog2_test.go",
		"gc_test.go",
		"gcinfo_test.go",
		"hash_test.go",
		"iface_test.go",
		"lfstack_test.go",
		"malloc_test.go",
		"map_benchmark_test.go",
		"map_test.go",
		"memmove_test.go",
		"mfinal_test.go",
		"norace_test.go",
		"proc_test.go",
		"profbuf_test.go",
		"rand_test.go",
		"runtime-gdb_test.go",
		"runtime-lldb_test.go",
		"runtime_mmap_test.go",
		"runtime_test.go",
		"runtime_unix_test.go",
		"rwmutex_test.go",
		"semasleep_test.go",
		"sizeof_test.go",
		"slice_test.go",
		"softfloat64_test.go",
		"stack_test.go",
		"string_test.go",
		"symtab_test.go",
		"treap_test.go"
	],
	"XTestImports": [
		"bytes",
		"crypto/rand",
		"encoding/binary",
		"flag",
		"fmt",
		"internal/race",
		"internal/testenv",
		"io",
		"io/ioutil",
		"math",
		"math/cmplx",
		"math/rand",
		"net",
		"os",
		"os/exec",
		"path/filepath",
		"reflect",
		"regexp",
		"runtime",
		"runtime/debug",
		"runtime/internal/sys",
		"sort",
		"strconv",
		"strings",
		"sync",
		"sync/atomic",
		"syscall",
		"testing",
		"time",
		"unicode/utf8",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/reflectlite",
	"ImportPath": "internal/reflectlite",
	"Name": "reflectlite",
	"Doc": "Package reflectlite implements lightweight version of reflect, not using any package except for \"runtime\" and \"unsafe\".",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/reflectlite.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"swapper.go",
		"type.go",
		"value.go"
	],
	"CompiledGoFiles": [
		"swapper.go",
		"type.go",
		"value.go",
		"asm.s"
	],
	"SFiles": [
		"asm.s"
	],
	"Imports": [
		"runtime",
		"unsafe"
	],
	"Deps": [
		"internal/bytealg",
		"internal/cpu",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"TestImports": [
		"unsafe"
	],
	"XTestGoFiles": [
		"all_test.go",
		"set_test.go",
		"tostring_test.go"
	],
	"XTestImports": [
		"bytes",
		"encoding/base64",
		"fmt",
		"go/ast",
		"go/token",
		"internal/reflectlite",
		"io",
		"math",
		"reflect",
		"runtime",
		"strconv",
		"testing",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/errors",
	"ImportPath": "errors",
	"Name": "errors",
	"Doc": "Package errors implements functions to manipulate errors.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/errors.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"errors.go",
		"wrap.go"
	],
	"CompiledGoFiles": [
		"errors.go",
		"wrap.go"
	],
	"Imports": [
		"internal/reflectlite"
	],
	"Deps": [
		"internal/bytealg",
		"internal/cpu",
		"internal/reflectlite",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"unsafe"
	],
	"XTestGoFiles": [
		"errors_test.go",
		"example_test.go",
		"wrap_test.go"
	],
	"XTestImports": [
		"errors",
		"fmt",
		"os",
		"reflect",
		"testing",
		"time"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/math/bits",
	"ImportPath": "math/bits",
	"Name": "bits",
	"Doc": "Package bits implements bit counting and manipulation functions for the predeclared unsigned integer types.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/math/bits.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"bits.go",
		"bits_errors.go",
		"bits_tables.go"
	],
	"CompiledGoFiles": [
		"bits.go",
		"bits_errors.go",
		"bits_tables.go"
	],
	"IgnoredGoFiles": [
		"bits_errors_bootstrap.go",
		"make_examples.go",
		"make_tables.go"
	],
	"Imports": [
		"unsafe"
	],
	"Deps": [
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"XTestGoFiles": [
		"bits_test.go",
		"example_test.go"
	],
	"XTestImports": [
		"fmt",
		"math/bits",
		"runtime",
		"testing",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/math",
	"ImportPath": "math",
	"Name": "math",
	"Doc": "Package math provides basic constants and mathematical functions.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/math.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"abs.go",
		"acosh.go",
		"asin.go",
		"asinh.go",
		"atan.go",
		"atan2.go",
		"atanh.go",
		"bits.go",
		"cbrt.go",
		"const.go",
		"copysign.go",
		"dim.go",
		"erf.go",
		"erfinv.go",
		"exp.go",
		"exp_asm.go",
		"expm1.go",
		"floor.go",
		"frexp.go",
		"gamma.go",
		"hypot.go",
		"j0.go",
		"j1.go",
		"jn.go",
		"ldexp.go",
		"lgamma.go",
		"log.go",
		"log10.go",
		"log1p.go",
		"logb.go",
		"mod.go",
		"modf.go",
		"nextafter.go",
		"pow.go",
		"pow10.go",
		"remainder.go",
		"signbit.go",
		"sin.go",
		"sincos.go",
		"sinh.go",
		"sqrt.go",
		"tan.go",
		"tanh.go",
		"trig_reduce.go",
		"unsafe.go"
	],
	"CompiledGoFiles": [
		"abs.go",
		"acosh.go",
		"asin.go",
		"asinh.go",
		"atan.go",
		"atan2.go",
		"atanh.go",
		"bits.go",
		"cbrt.go",
		"const.go",
		"copysign.go",
		"dim.go",
		"erf.go",
		"erfinv.go",
		"exp.go",
		"exp_asm.go",
		"expm1.go",
		"floor.go",
		"frexp.go",
		"gamma.go",
		"hypot.go",
		"j0.go",
		"j1.go",
		"jn.go",
		"ldexp.go",
		"lgamma.go",
		"log.go",
		"log10.go",
		"log1p.go",
		"logb.go",
		"mod.go",
		"modf.go",
		"nextafter.go",
		"pow.go",
		"pow10.go",
		"remainder.go",
		"signbit.go",
		"sin.go",
		"sincos.go",
		"sinh.go",
		"sqrt.go",
		"tan.go",
		"tanh.go",
		"trig_reduce.go",
		"unsafe.go",
		"dim_amd64.s",
		"exp_amd64.s",
		"floor_amd64.s",
		"hypot_amd64.s",
		"log_amd64.s",
		"sqrt_amd64.s",
		"stubs_amd64.s"
	],
	"IgnoredGoFiles": [
		"arith_s390x.go",
		"arith_s390x_test.go",
		"export_s390x_test.go"
	],
	"SFiles": [
		"dim_amd64.s",
		"exp_amd64.s",
		"floor_amd64.s",
		"hypot_amd64.s",
		"log_amd64.s",
		"sqrt_amd64.s",
		"stubs_amd64.s"
	],
	"Imports": [
		"internal/cpu",
		"math/bits",
		"unsafe"
	],
	"Deps": [
		"internal/cpu",
		"math/bits",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"XTestGoFiles": [
		"all_test.go",
		"example_test.go",
		"huge_test.go"
	],
	"XTestImports": [
		"fmt",
		"math",
		"testing",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/unicode/utf8",
	"ImportPath": "unicode/utf8",
	"Name": "utf8",
	"Doc": "Package utf8 implements functions and constants to support text encoded in UTF-8.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/unicode/utf8.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"utf8.go"
	],
	"CompiledGoFiles": [
		"utf8.go"
	],
	"XTestGoFiles": [
		"example_test.go",
		"utf8_test.go"
	],
	"XTestImports": [
		"bytes",
		"fmt",
		"testing",
		"unicode",
		"unicode/utf8"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/strconv",
	"ImportPath": "strconv",
	"Name": "strconv",
	"Doc": "Package strconv implements conversions to and from string representations of basic data types.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/strconv.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"atob.go",
		"atof.go",
		"atoi.go",
		"decimal.go",
		"doc.go",
		"extfloat.go",
		"ftoa.go",
		"isprint.go",
		"itoa.go",
		"quote.go"
	],
	"CompiledGoFiles": [
		"atob.go",
		"atof.go",
		"atoi.go",
		"decimal.go",
		"doc.go",
		"extfloat.go",
		"ftoa.go",
		"isprint.go",
		"itoa.go",
		"quote.go"
	],
	"IgnoredGoFiles": [
		"makeisprint.go"
	],
	"Imports": [
		"errors",
		"internal/bytealg",
		"math",
		"math/bits",
		"unicode/utf8"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/reflectlite",
		"math",
		"math/bits",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"unicode/utf8",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go",
		"internal_test.go"
	],
	"XTestGoFiles": [
		"atob_test.go",
		"atof_test.go",
		"atoi_test.go",
		"decimal_test.go",
		"example_test.go",
		"fp_test.go",
		"ftoa_test.go",
		"itoa_test.go",
		"quote_test.go",
		"strconv_test.go"
	],
	"XTestImports": [
		"bufio",
		"bytes",
		"errors",
		"fmt",
		"log",
		"math",
		"math/rand",
		"os",
		"reflect",
		"runtime",
		"strconv",
		"strings",
		"sync",
		"testing",
		"time",
		"unicode"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/race",
	"ImportPath": "internal/race",
	"Name": "race",
	"Doc": "Package race contains helper functions for manually instrumenting code for the race detector.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/race.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"doc.go",
		"norace.go"
	],
	"CompiledGoFiles": [
		"doc.go",
		"norace.go"
	],
	"IgnoredGoFiles": [
		"race.go"
	],
	"Imports": [
		"unsafe"
	],
	"Deps": [
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/sync/atomic",
	"ImportPath": "sync/atomic",
	"Name": "atomic",
	"Doc": "Package atomic provides low-level atomic memory primitives useful for implementing synchronization algorithms.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/sync/atomic.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"doc.go",
		"value.go"
	],
	"CompiledGoFiles": [
		"doc.go",
		"value.go",
		"asm.s"
	],
	"SFiles": [
		"asm.s"
	],
	"Imports": [
		"unsafe"
	],
	"Deps": [
		"unsafe"
	],
	"XTestGoFiles": [
		"atomic_test.go",
		"example_test.go",
		"value_test.go"
	],
	"XTestImports": [
		"fmt",
		"math/rand",
		"runtime",
		"strings",
		"sync",
		"sync/atomic",
		"testing",
		"time",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/sync",
	"ImportPath": "sync",
	"Name": "sync",
	"Doc": "Package sync provides basic synchronization primitives such as mutual exclusion locks.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/sync.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"cond.go",
		"map.go",
		"mutex.go",
		"once.go",
		"pool.go",
		"poolqueue.go",
		"runtime.go",
		"rwmutex.go",
		"waitgroup.go"
	],
	"CompiledGoFiles": [
		"cond.go",
		"map.go",
		"mutex.go",
		"once.go",
		"pool.go",
		"poolqueue.go",
		"runtime.go",
		"rwmutex.go",
		"waitgroup.go"
	],
	"Imports": [
		"internal/race",
		"runtime",
		"sync/atomic",
		"unsafe"
	],
	"Deps": [
		"internal/bytealg",
		"internal/cpu",
		"internal/race",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sync/atomic",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"XTestGoFiles": [
		"cond_test.go",
		"example_pool_test.go",
		"example_test.go",
		"map_bench_test.go",
		"map_reference_test.go",
		"map_test.go",
		"mutex_test.go",
		"once_test.go",
		"pool_test.go",
		"runtime_sema_test.go",
		"rwmutex_test.go",
		"waitgroup_test.go"
	],
	"XTestImports": [
		"bytes",
		"fmt",
		"internal/race",
		"internal/testenv",
		"io",
		"math/rand",
		"os",
		"os/exec",
		"reflect",
		"runtime",
		"runtime/debug",
		"sort",
		"strings",
		"sync",
		"sync/atomic",
		"testing",
		"testing/quick",
		"time"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/unicode",
	"ImportPath": "unicode",
	"Name": "unicode",
	"Doc": "Package unicode provides data and functions to test some properties of Unicode code points.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/unicode.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"casetables.go",
		"digit.go",
		"graphic.go",
		"letter.go",
		"tables.go"
	],
	"CompiledGoFiles": [
		"casetables.go",
		"digit.go",
		"graphic.go",
		"letter.go",
		"tables.go"
	],
	"XTestGoFiles": [
		"digit_test.go",
		"example_test.go",
		"graphic_test.go",
		"letter_test.go",
		"script_test.go"
	],
	"XTestImports": [
		"flag",
		"fmt",
		"runtime",
		"sort",
		"strings",
		"testing",
		"unicode"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/reflect",
	"ImportPath": "reflect",
	"Name": "reflect",
	"Doc": "Package reflect implements run-time reflection, allowing a program to manipulate objects with arbitrary types.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/reflect.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"deepequal.go",
		"makefunc.go",
		"swapper.go",
		"type.go",
		"value.go"
	],
	"CompiledGoFiles": [
		"deepequal.go",
		"makefunc.go",
		"swapper.go",
		"type.go",
		"value.go",
		"asm_amd64.s"
	],
	"SFiles": [
		"asm_amd64.s"
	],
	"Imports": [
		"math",
		"runtime",
		"strconv",
		"sync",
		"unicode",
		"unicode/utf8",
		"unsafe"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/race",
		"internal/reflectlite",
		"math",
		"math/bits",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"strconv",
		"sync",
		"sync/atomic",
		"unicode",
		"unicode/utf8",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"TestImports": [
		"unsafe"
	],
	"XTestGoFiles": [
		"all_test.go",
		"example_test.go",
		"set_test.go",
		"tostring_test.go"
	],
	"XTestImports": [
		"bytes",
		"encoding/base64",
		"encoding/json",
		"flag",
		"fmt",
		"go/ast",
		"go/token",
		"io",
		"math",
		"math/rand",
		"os",
		"reflect",
		"runtime",
		"sort",
		"strconv",
		"strings",
		"sync",
		"sync/atomic",
		"testing",
		"time",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/sort",
	"ImportPath": "sort",
	"Name": "sort",
	"Doc": "Package sort provides primitives for sorting slices and user-defined collections.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/sort.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"search.go",
		"slice.go",
		"slice_go113.go",
		"sort.go",
		"zfuncversion.go"
	],
	"CompiledGoFiles": [
		"search.go",
		"slice.go",
		"slice_go113.go",
		"sort.go",
		"zfuncversion.go"
	],
	"IgnoredGoFiles": [
		"genzfunc.go",
		"slice_go14.go",
		"slice_go18.go"
	],
	"Imports": [
		"internal/reflectlite"
	],
	"Deps": [
		"internal/bytealg",
		"internal/cpu",
		"internal/reflectlite",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"XTestGoFiles": [
		"example_interface_test.go",
		"example_keys_test.go",
		"example_multi_test.go",
		"example_search_test.go",
		"example_test.go",
		"example_wrapper_test.go",
		"search_test.go",
		"sort_test.go"
	],
	"XTestImports": [
		"fmt",
		"internal/testenv",
		"math",
		"math/rand",
		"runtime",
		"sort",
		"strconv",
		"strings",
		"testing"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/fmtsort",
	"ImportPath": "internal/fmtsort",
	"Name": "fmtsort",
	"Doc": "Package fmtsort provides a general stable ordering mechanism for maps, on behalf of the fmt and text/template packages.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/fmtsort.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"sort.go"
	],
	"CompiledGoFiles": [
		"sort.go"
	],
	"Imports": [
		"reflect",
		"sort"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/race",
		"internal/reflectlite",
		"math",
		"math/bits",
		"reflect",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sort",
		"strconv",
		"sync",
		"sync/atomic",
		"unicode",
		"unicode/utf8",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"TestImports": [
		"reflect"
	],
	"XTestGoFiles": [
		"sort_test.go"
	],
	"XTestImports": [
		"fmt",
		"internal/fmtsort",
		"math",
		"reflect",
		"strings",
		"testing"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/io",
	"ImportPath": "io",
	"Name": "io",
	"Doc": "Package io provides basic interfaces to I/O primitives.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/io.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"io.go",
		"multi.go",
		"pipe.go"
	],
	"CompiledGoFiles": [
		"io.go",
		"multi.go",
		"pipe.go"
	],
	"Imports": [
		"errors",
		"sync",
		"sync/atomic"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/race",
		"internal/reflectlite",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sync",
		"sync/atomic",
		"unsafe"
	],
	"XTestGoFiles": [
		"example_test.go",
		"io_test.go",
		"multi_test.go",
		"pipe_test.go"
	],
	"XTestImports": [
		"bytes",
		"crypto/sha1",
		"errors",
		"fmt",
		"io",
		"io/ioutil",
		"log",
		"os",
		"runtime",
		"sort",
		"strings",
		"testing",
		"time"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/oserror",
	"ImportPath": "internal/oserror",
	"Name": "oserror",
	"Doc": "Package oserror defines errors values used in the os package.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/oserror.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"errors.go"
	],
	"CompiledGoFiles": [
		"errors.go"
	],
	"Imports": [
		"errors"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/reflectlite",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/syscall",
	"ImportPath": "syscall",
	"Name": "syscall",
	"Doc": "Package syscall contains an interface to the low-level operating system primitives.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/syscall.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"bpf_darwin.go",
		"dirent.go",
		"endian_little.go",
		"env_unix.go",
		"exec_darwin.go",
		"exec_unix.go",
		"flock_darwin.go",
		"forkpipe.go",
		"msan0.go",
		"net.go",
		"route_bsd.go",
		"route_darwin.go",
		"sockcmsg_unix.go",
		"str.go",
		"syscall.go",
		"syscall_bsd.go",
		"syscall_darwin.go",
		"syscall_darwin_amd64.go",
		"syscall_unix.go",
		"timestruct.go",
		"zerrors_darwin_amd64.go",
		"zsyscall_darwin_amd64.go",
		"zsysnum_darwin_amd64.go",
		"ztypes_darwin_amd64.go"
	],
	"CompiledGoFiles": [
		"bpf_darwin.go",
		"dirent.go",
		"endian_little.go",
		"env_unix.go",
		"exec_darwin.go",
		"exec_unix.go",
		"flock_darwin.go",
		"forkpipe.go",
		"msan0.go",
		"net.go",
		"route_bsd.go",
		"route_darwin.go",
		"sockcmsg_unix.go",
		"str.go",
		"syscall.go",
		"syscall_bsd.go",
		"syscall_darwin.go",
		"syscall_darwin_amd64.go",
		"syscall_unix.go",
		"timestruct.go",
		"zerrors_darwin_amd64.go",
		"zsyscall_darwin_amd64.go",
		"zsysnum_darwin_amd64.go",
		"ztypes_darwin_amd64.go",
		"asm_darwin_amd64.s",
		"zsyscall_darwin_amd64.s"
	],
	"IgnoredGoFiles": [
		"bpf_bsd.go",
		"const_plan9.go",
		"creds_test.go",
		"dir_plan9.go",
		"dll_windows.go",
		"endian_big.go",
		"env_plan9.go",
		"env_windows.go",
		"errors_plan9.go",
		"exec_aix_test.go",
		"exec_bsd.go",
		"exec_libc.go",
		"exec_linux.go",
		"exec_linux_test.go",
		"exec_plan9.go",
		"exec_solaris_test.go",
		"exec_windows.go",
		"export_freebsd_test.go",
		"export_linux_test.go",
		"fd_nacl.go",
		"flock.go",
		"flock_aix.go",
		"flock_linux_32bit.go",
		"forkpipe2.go",
		"fs_js.go",
		"fs_nacl.go",
		"lsf_linux.go",
		"mkasm_darwin.go",
		"mkpost.go",
		"mksyscall_windows.go",
		"msan.go",
		"net_js.go",
		"net_nacl.go",
		"netlink_linux.go",
		"pwd_plan9.go",
		"route_dragonfly.go",
		"route_freebsd.go",
		"route_freebsd_32bit.go",
		"route_freebsd_64bit.go",
		"route_netbsd.go",
		"route_openbsd.go",
		"security_windows.go",
		"setuidgid_32_linux.go",
		"setuidgid_linux.go",
		"sockcmsg_linux.go",
		"syscall_aix.go",
		"syscall_aix_ppc64.go",
		"syscall_darwin_386.go",
		"syscall_darwin_arm.go",
		"syscall_darwin_arm64.go",
		"syscall_dragonfly.go",
		"syscall_dragonfly_amd64.go",
		"syscall_freebsd.go",
		"syscall_freebsd_386.go",
		"syscall_freebsd_amd64.go",
		"syscall_freebsd_arm.go",
		"syscall_freebsd_test.go",
		"syscall_getwd_bsd.go",
		"syscall_js.go",
		"syscall_linux.go",
		"syscall_linux_386.go",
		"syscall_linux_amd64.go",
		"syscall_linux_arm.go",
		"syscall_linux_arm64.go",
		"syscall_linux_mips64x.go",
		"syscall_linux_mipsx.go",
		"syscall_linux_ppc64x.go",
		"syscall_linux_s390x.go",
		"syscall_linux_test.go",
		"syscall_nacl.go",
		"syscall_nacl_386.go",
		"syscall_nacl_amd64p32.go",
		"syscall_nacl_arm.go",
		"syscall_netbsd.go",
		"syscall_netbsd_386.go",
		"syscall_netbsd_amd64.go",
		"syscall_netbsd_arm.go",
		"syscall_netbsd_arm64.go",
		"syscall_openbsd.go",
		"syscall_openbsd_386.go",
		"syscall_openbsd_amd64.go",
		"syscall_openbsd_arm.go",
		"syscall_openbsd_arm64.go",
		"syscall_plan9.go",
		"syscall_plan9_test.go",
		"syscall_solaris.go",
		"syscall_solaris_amd64.go",
		"syscall_windows.go",
		"syscall_windows_386.go",
		"syscall_windows_amd64.go",
		"syscall_windows_test.go",
		"tables_nacljs.go",
		"types_aix.go",
		"types_darwin.go",
		"types_dragonfly.go",
		"types_freebsd.go",
		"types_linux.go",
		"types_netbsd.go",
		"types_openbsd.go",
		"types_solaris.go",
		"types_windows.go",
		"types_windows_386.go",
		"types_windows_amd64.go",
		"types_windows_arm.go",
		"unzip_nacl.go",
		"zerrors_aix_ppc64.go",
		"zerrors_darwin_386.go",
		"zerrors_darwin_arm.go",
		"zerrors_darwin_arm64.go",
		"zerrors_dragonfly_amd64.go",
		"zerrors_freebsd_386.go",
		"zerrors_freebsd_amd64.go",
		"zerrors_freebsd_arm.go",
		"zerrors_linux_386.go",
		"zerrors_linux_amd64.go",
		"zerrors_linux_arm.go",
		"zerrors_linux_arm64.go",
		"zerrors_linux_mips.go",
		"zerrors_linux_mips64.go",
		"zerrors_linux_mips64le.go",
		"zerrors_linux_mipsle.go",
		"zerrors_linux_ppc64.go",
		"zerrors_linux_ppc64le.go",
		"zerrors_linux_s390x.go",
		"zerrors_netbsd_386.go",
		"zerrors_netbsd_amd64.go",
		"zerrors_netbsd_arm.go",
		"zerrors_netbsd_arm64.go",
		"zerrors_openbsd_386.go",
		"zerrors_openbsd_amd64.go",
		"zerrors_openbsd_arm.go",
		"zerrors_openbsd_arm64.go",
		"zerrors_solaris_amd64.go",
		"zerrors_windows.go",
		"zerrors_windows_386.go",
		"zerrors_windows_amd64.go",
		"zsyscall_aix_ppc64.go",
		"zsyscall_darwin_386.go",
		"zsyscall_darwin_arm.go",
		"zsyscall_darwin_arm64.go",
		"zsyscall_dragonfly_amd64.go",
		"zsyscall_freebsd_386.go",
		"zsyscall_freebsd_amd64.go",
		"zsyscall_freebsd_arm.go",
		"zsyscall_linux_386.go",
		"zsyscall_linux_amd64.go",
		"zsyscall_linux_arm.go",
		"zsyscall_linux_arm64.go",
		"zsyscall_linux_mips.go",
		"zsyscall_linux_mips64.go",
		"zsyscall_linux_mips64le.go",
		"zsyscall_linux_mipsle.go",
		"zsyscall_linux_ppc64.go",
		"zsyscall_linux_ppc64le.go",
		"zsyscall_linux_s390x.go",
		"zsyscall_nacl_386.go",
		"zsyscall_nacl_amd64p32.go",
		"zsyscall_nacl_arm.go",
		"zsyscall_netbsd_386.go",
		"zsyscall_netbsd_amd64.go",
		"zsyscall_netbsd_arm.go",
		"zsyscall_netbsd_arm64.go",
		"zsyscall_openbsd_386.go",
		"zsyscall_openbsd_amd64.go",
		"zsyscall_openbsd_arm.go",
		"zsyscall_openbsd_arm64.go",
		"zsyscall_plan9_386.go",
		"zsyscall_plan9_amd64.go",
		"zsyscall_plan9_arm.go",
		"zsyscall_solaris_amd64.go",
		"zsyscall_windows.go",
		"zsysctl_openbsd.go",
		"zsysnum_darwin_386.go",
		"zsysnum_darwin_arm.go",
		"zsysnum_darwin_arm64.go",
		"zsysnum_dragonfly_amd64.go",
		"zsysnum_freebsd_386.go",
		"zsysnum_freebsd_amd64.go",
		"zsysnum_freebsd_arm.go",
		"zsysnum_linux_386.go",
		"zsysnum_linux_amd64.go",
		"zsysnum_linux_arm.go",
		"zsysnum_linux_arm64.go",
		"zsysnum_linux_mips.go",
		"zsysnum_linux_mips64.go",
		"zsysnum_linux_mips64le.go",
		"zsysnum_linux_mipsle.go",
		"zsysnum_linux_ppc64.go",
		"zsysnum_linux_ppc64le.go",
		"zsysnum_linux_s390x.go",
		"zsysnum_netbsd_386.go",
		"zsysnum_netbsd_amd64.go",
		"zsysnum_netbsd_arm.go",
		"zsysnum_netbsd_arm64.go",
		"zsysnum_openbsd_386.go",
		"zsysnum_openbsd_amd64.go",
		"zsysnum_openbsd_arm.go",
		"zsysnum_openbsd_arm64.go",
		"zsysnum_plan9.go",
		"zsysnum_solaris_amd64.go",
		"zsysnum_windows_386.go",
		"zsysnum_windows_amd64.go",
		"ztypes_aix_ppc64.go",
		"ztypes_darwin_386.go",
		"ztypes_darwin_arm.go",
		"ztypes_darwin_arm64.go",
		"ztypes_dragonfly_amd64.go",
		"ztypes_freebsd_386.go",
		"ztypes_freebsd_amd64.go",
		"ztypes_freebsd_arm.go",
		"ztypes_linux_386.go",
		"ztypes_linux_amd64.go",
		"ztypes_linux_arm.go",
		"ztypes_linux_arm64.go",
		"ztypes_linux_mips.go",
		"ztypes_linux_mips64.go",
		"ztypes_linux_mips64le.go",
		"ztypes_linux_mipsle.go",
		"ztypes_linux_ppc64.go",
		"ztypes_linux_ppc64le.go",
		"ztypes_linux_s390x.go",
		"ztypes_netbsd_386.go",
		"ztypes_netbsd_amd64.go",
		"ztypes_netbsd_arm.go",
		"ztypes_netbsd_arm64.go",
		"ztypes_openbsd_386.go",
		"ztypes_openbsd_amd64.go",
		"ztypes_openbsd_arm.go",
		"ztypes_openbsd_arm64.go",
		"ztypes_solaris_amd64.go"
	],
	"SFiles": [
		"asm_darwin_amd64.s",
		"zsyscall_darwin_amd64.s"
	],
	"Imports": [
		"errors",
		"internal/bytealg",
		"internal/oserror",
		"internal/race",
		"runtime",
		"sync",
		"unsafe"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/oserror",
		"internal/race",
		"internal/reflectlite",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sync",
		"sync/atomic",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go",
		"export_unix_test.go"
	],
	"XTestGoFiles": [
		"dirent_bsd_test.go",
		"exec_unix_test.go",
		"getdirentries_test.go",
		"mmap_unix_test.go",
		"syscall_bsd_test.go",
		"syscall_ptrace_test.go",
		"syscall_test.go",
		"syscall_unix_test.go"
	],
	"XTestImports": [
		"bytes",
		"flag",
		"fmt",
		"internal/testenv",
		"io",
		"io/ioutil",
		"net",
		"os",
		"os/exec",
		"os/signal",
		"path/filepath",
		"runtime",
		"sort",
		"strconv",
		"strings",
		"syscall",
		"testing",
		"time",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/time",
	"ImportPath": "time",
	"Name": "time",
	"Doc": "Package time provides functionality for measuring and displaying time.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/time.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"format.go",
		"sleep.go",
		"sys_unix.go",
		"tick.go",
		"time.go",
		"zoneinfo.go",
		"zoneinfo_read.go",
		"zoneinfo_unix.go"
	],
	"CompiledGoFiles": [
		"format.go",
		"sleep.go",
		"sys_unix.go",
		"tick.go",
		"time.go",
		"zoneinfo.go",
		"zoneinfo_read.go",
		"zoneinfo_unix.go"
	],
	"IgnoredGoFiles": [
		"export_android_test.go",
		"export_windows_test.go",
		"genzabbrs.go",
		"sys_plan9.go",
		"sys_windows.go",
		"zoneinfo_abbrs_windows.go",
		"zoneinfo_android.go",
		"zoneinfo_android_test.go",
		"zoneinfo_ios.go",
		"zoneinfo_js.go",
		"zoneinfo_plan9.go",
		"zoneinfo_windows.go",
		"zoneinfo_windows_test.go"
	],
	"Imports": [
		"errors",
		"runtime",
		"sync",
		"syscall",
		"unsafe"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/oserror",
		"internal/race",
		"internal/reflectlite",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sync",
		"sync/atomic",
		"syscall",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go",
		"internal_test.go"
	],
	"TestImports": [
		"sync"
	],
	"XTestGoFiles": [
		"example_test.go",
		"format_test.go",
		"mono_test.go",
		"sleep_test.go",
		"tick_test.go",
		"time_test.go",
		"zoneinfo_test.go"
	],
	"XTestImports": [
		"bytes",
		"encoding/gob",
		"encoding/json",
		"errors",
		"fmt",
		"internal/race",
		"math/big",
		"math/rand",
		"os",
		"reflect",
		"runtime",
		"strconv",
		"strings",
		"sync",
		"sync/atomic",
		"testing",
		"testing/quick",
		"time"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/poll",
	"ImportPath": "internal/poll",
	"Name": "poll",
	"Doc": "Package poll supports non-blocking I/O on file descriptors with polling.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/poll.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"errno_unix.go",
		"fd.go",
		"fd_fsync_darwin.go",
		"fd_mutex.go",
		"fd_opendir_darwin.go",
		"fd_poll_runtime.go",
		"fd_posix.go",
		"fd_unix.go",
		"fd_writev_darwin.go",
		"hook_unix.go",
		"sockopt.go",
		"sockopt_unix.go",
		"sockoptip.go",
		"sys_cloexec.go",
		"writev.go"
	],
	"CompiledGoFiles": [
		"errno_unix.go",
		"fd.go",
		"fd_fsync_darwin.go",
		"fd_mutex.go",
		"fd_opendir_darwin.go",
		"fd_poll_runtime.go",
		"fd_posix.go",
		"fd_unix.go",
		"fd_writev_darwin.go",
		"hook_unix.go",
		"sockopt.go",
		"sockopt_unix.go",
		"sockoptip.go",
		"sys_cloexec.go",
		"writev.go"
	],
	"IgnoredGoFiles": [
		"errno_windows.go",
		"error_linux_test.go",
		"export_windows_test.go",
		"fd_fsync_posix.go",
		"fd_fsync_windows.go",
		"fd_io_plan9.go",
		"fd_plan9.go",
		"fd_poll_nacljs.go",
		"fd_windows.go",
		"fd_windows_test.go",
		"fd_writev_unix.go",
		"hook_cloexec.go",
		"hook_windows.go",
		"sendfile_bsd.go",
		"sendfile_linux.go",
		"sendfile_solaris.go",
		"sendfile_windows.go",
		"sock_cloexec.go",
		"sockopt_linux.go",
		"sockopt_windows.go",
		"splice_linux.go",
		"strconv.go"
	],
	"Imports": [
		"errors",
		"io",
		"runtime",
		"sync",
		"sync/atomic",
		"syscall",
		"time",
		"unsafe"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/oserror",
		"internal/race",
		"internal/reflectlite",
		"io",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sync",
		"sync/atomic",
		"syscall",
		"time",
		"unsafe"
	],
	"TestGoFiles": [
		"export_posix_test.go",
		"export_test.go"
	],
	"XTestGoFiles": [
		"error_stub_test.go",
		"error_test.go",
		"fd_mutex_test.go",
		"fd_posix_test.go",
		"read_test.go",
		"writev_test.go"
	],
	"XTestImports": [
		"errors",
		"fmt",
		"internal/poll",
		"io",
		"io/ioutil",
		"math/rand",
		"net",
		"os",
		"reflect",
		"runtime",
		"strings",
		"sync",
		"testing",
		"time"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/syscall/unix",
	"ImportPath": "internal/syscall/unix",
	"Name": "unix",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/syscall/unix.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"at_darwin.go",
		"at_sysnum_darwin.go",
		"nonblocking_darwin.go"
	],
	"CompiledGoFiles": [
		"at_darwin.go",
		"at_sysnum_darwin.go",
		"nonblocking_darwin.go"
	],
	"IgnoredGoFiles": [
		"at.go",
		"at_aix.go",
		"at_freebsd.go",
		"at_libc.go",
		"at_solaris.go",
		"at_sysnum_dragonfly.go",
		"at_sysnum_fstatat64_linux.go",
		"at_sysnum_fstatat_linux.go",
		"at_sysnum_linux.go",
		"at_sysnum_netbsd.go",
		"at_sysnum_newfstatat_linux.go",
		"at_sysnum_openbsd.go",
		"getentropy_openbsd.go",
		"getrandom_freebsd.go",
		"getrandom_linux.go",
		"getrandom_linux_386.go",
		"getrandom_linux_amd64.go",
		"getrandom_linux_arm.go",
		"getrandom_linux_generic.go",
		"getrandom_linux_mips64x.go",
		"getrandom_linux_mipsx.go",
		"getrandom_linux_ppc64x.go",
		"getrandom_linux_s390x.go",
		"ioctl_aix.go",
		"nonblocking.go",
		"nonblocking_js.go",
		"nonblocking_nacl.go"
	],
	"Imports": [
		"syscall",
		"unsafe"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/oserror",
		"internal/race",
		"internal/reflectlite",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sync",
		"sync/atomic",
		"syscall",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/internal/testlog",
	"ImportPath": "internal/testlog",
	"Name": "testlog",
	"Doc": "Package testlog provides a back-channel communication path between tests and package os, so that cmd/go can see which environment variables and files a test consults.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/internal/testlog.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"log.go"
	],
	"CompiledGoFiles": [
		"log.go"
	],
	"Imports": [
		"sync/atomic"
	],
	"Deps": [
		"sync/atomic",
		"unsafe"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/os",
	"ImportPath": "os",
	"Name": "os",
	"Doc": "Package os provides a platform-independent interface to operating system functionality.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/os.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"dir.go",
		"dir_darwin.go",
		"env.go",
		"env_default.go",
		"error.go",
		"error_errno.go",
		"error_posix.go",
		"exec.go",
		"exec_posix.go",
		"exec_unix.go",
		"executable.go",
		"executable_darwin.go",
		"file.go",
		"file_posix.go",
		"file_unix.go",
		"getwd.go",
		"getwd_darwin.go",
		"path.go",
		"path_unix.go",
		"pipe_bsd.go",
		"proc.go",
		"rawconn.go",
		"removeall_at.go",
		"stat.go",
		"stat_darwin.go",
		"stat_unix.go",
		"sticky_bsd.go",
		"str.go",
		"sys.go",
		"sys_bsd.go",
		"sys_unix.go",
		"types.go",
		"types_unix.go",
		"wait_unimp.go"
	],
	"CompiledGoFiles": [
		"dir.go",
		"dir_darwin.go",
		"env.go",
		"env_default.go",
		"error.go",
		"error_errno.go",
		"error_posix.go",
		"exec.go",
		"exec_posix.go",
		"exec_unix.go",
		"executable.go",
		"executable_darwin.go",
		"file.go",
		"file_posix.go",
		"file_unix.go",
		"getwd.go",
		"getwd_darwin.go",
		"path.go",
		"path_unix.go",
		"pipe_bsd.go",
		"proc.go",
		"rawconn.go",
		"removeall_at.go",
		"stat.go",
		"stat_darwin.go",
		"stat_unix.go",
		"sticky_bsd.go",
		"str.go",
		"sys.go",
		"sys_bsd.go",
		"sys_unix.go",
		"types.go",
		"types_unix.go",
		"wait_unimp.go"
	],
	"IgnoredGoFiles": [
		"dir_plan9.go",
		"dir_unix.go",
		"dir_windows.go",
		"env_windows.go",
		"error_plan9.go",
		"error_windows_test.go",
		"exec_plan9.go",
		"exec_windows.go",
		"executable_freebsd.go",
		"executable_path.go",
		"executable_plan9.go",
		"executable_procfs.go",
		"executable_solaris.go",
		"executable_windows.go",
		"export_windows_test.go",
		"file_plan9.go",
		"file_windows.go",
		"os_windows_test.go",
		"path_plan9.go",
		"path_windows.go",
		"path_windows_test.go",
		"pipe2_bsd.go",
		"pipe_linux.go",
		"removeall_noat.go",
		"stat_aix.go",
		"stat_dragonfly.go",
		"stat_freebsd.go",
		"stat_linux.go",
		"stat_nacljs.go",
		"stat_netbsd.go",
		"stat_openbsd.go",
		"stat_plan9.go",
		"stat_solaris.go",
		"stat_windows.go",
		"sticky_notbsd.go",
		"sys_aix.go",
		"sys_js.go",
		"sys_linux.go",
		"sys_nacl.go",
		"sys_plan9.go",
		"sys_solaris.go",
		"sys_windows.go",
		"types_plan9.go",
		"types_windows.go",
		"wait_wait6.go",
		"wait_waitid.go"
	],
	"Imports": [
		"errors",
		"internal/oserror",
		"internal/poll",
		"internal/syscall/unix",
		"internal/testlog",
		"io",
		"runtime",
		"sync",
		"sync/atomic",
		"syscall",
		"time",
		"unsafe"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/oserror",
		"internal/poll",
		"internal/race",
		"internal/reflectlite",
		"internal/syscall/unix",
		"internal/testlog",
		"io",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sync",
		"sync/atomic",
		"syscall",
		"time",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go",
		"export_unix_test.go"
	],
	"XTestGoFiles": [
		"env_test.go",
		"env_unix_test.go",
		"error_test.go",
		"error_unix_test.go",
		"example_test.go",
		"executable_test.go",
		"fifo_test.go",
		"os_test.go",
		"os_unix_test.go",
		"path_test.go",
		"pipe_test.go",
		"rawconn_test.go",
		"removeall_test.go",
		"stat_test.go",
		"timeout_test.go"
	],
	"XTestImports": [
		"bufio",
		"bytes",
		"errors",
		"flag",
		"fmt",
		"internal/poll",
		"internal/testenv",
		"io",
		"io/ioutil",
		"log",
		"math/rand",
		"os",
		"os/exec",
		"os/signal",
		"path/filepath",
		"reflect",
		"runtime",
		"runtime/debug",
		"sort",
		"strconv",
		"strings",
		"sync",
		"syscall",
		"testing",
		"time"
	]
}
{
	"Dir": "/usr/local/Cellar/go/1.13.8/libexec/src/fmt",
	"ImportPath": "fmt",
	"Name": "fmt",
	"Doc": "Package fmt implements formatted I/O with functions analogous to C's printf and scanf.",
	"Target": "/usr/local/Cellar/go/1.13.8/libexec/pkg/darwin_amd64/fmt.a",
	"Root": "/usr/local/Cellar/go/1.13.8/libexec",
	"Goroot": true,
	"Standard": true,
	"DepOnly": true,
	"GoFiles": [
		"doc.go",
		"errors.go",
		"format.go",
		"print.go",
		"scan.go"
	],
	"CompiledGoFiles": [
		"doc.go",
		"errors.go",
		"format.go",
		"print.go",
		"scan.go"
	],
	"Imports": [
		"errors",
		"internal/fmtsort",
		"io",
		"math",
		"os",
		"reflect",
		"strconv",
		"sync",
		"unicode/utf8"
	],
	"Deps": [
		"errors",
		"internal/bytealg",
		"internal/cpu",
		"internal/fmtsort",
		"internal/oserror",
		"internal/poll",
		"internal/race",
		"internal/reflectlite",
		"internal/syscall/unix",
		"internal/testlog",
		"io",
		"math",
		"math/bits",
		"os",
		"reflect",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sort",
		"strconv",
		"sync",
		"sync/atomic",
		"syscall",
		"time",
		"unicode",
		"unicode/utf8",
		"unsafe"
	],
	"TestGoFiles": [
		"export_test.go"
	],
	"XTestGoFiles": [
		"errors_test.go",
		"example_test.go",
		"fmt_test.go",
		"gostringer_example_test.go",
		"scan_test.go",
		"stringer_example_test.go",
		"stringer_test.go"
	],
	"XTestImports": [
		"bufio",
		"bytes",
		"errors",
		"fmt",
		"internal/race",
		"io",
		"math",
		"os",
		"reflect",
		"regexp",
		"runtime",
		"strings",
		"testing",
		"testing/iotest",
		"time",
		"unicode",
		"unicode/utf8"
	]
}
{
	"Dir": "/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree",
	"ImportPath": "side_project_golang/leetcode400/tree",
	"Name": "leettree",
	"Target": "/Users/my_user@domain.com/Documents/learngo/pkg/darwin_amd64/side_project_golang/leetcode400/tree.a",
	"Root": "/Users/my_user@domain.com/Documents/learngo",
	"Match": [
		"/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree"
	],
	"Stale": true,
	"StaleReason": "build ID mismatch",
	"GoFiles": [
		"107binaryTreeLevelOrderTraversalII.go",
		"108convertSortedArrayToBinarySearchTree.go",
		"109convertSortedListToBinarySearchTree.go",
		"113pathSumII.go",
		"173binarySearchTreeIterator.go",
		"199binaryTreeRightSideView.go",
		"230KthSmallestElementInBST.go",
		"257binaryTreePaths.go"
	],
	"CompiledGoFiles": [
		"107binaryTreeLevelOrderTraversalII.go",
		"108convertSortedArrayToBinarySearchTree.go",
		"109convertSortedListToBinarySearchTree.go",
		"113pathSumII.go",
		"173binarySearchTreeIterator.go",
		"199binaryTreeRightSideView.go",
		"230KthSmallestElementInBST.go",
		"257binaryTreePaths.go"
	],
	"Imports": [
		"fmt"
	],
	"Deps": [
		"errors",
		"fmt",
		"internal/bytealg",
		"internal/cpu",
		"internal/fmtsort",
		"internal/oserror",
		"internal/poll",
		"internal/race",
		"internal/reflectlite",
		"internal/syscall/unix",
		"internal/testlog",
		"io",
		"math",
		"math/bits",
		"os",
		"reflect",
		"runtime",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sort",
		"strconv",
		"sync",
		"sync/atomic",
		"syscall",
		"time",
		"unicode",
		"unicode/utf8",
		"unsafe"
	]
}
>>
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 go/packages.Load
	packages = 1
2020/02/13 19:52:35 Info:2020/02/13 19:52:35 go/packages.Load
	package = side_project_golang/leetcode400/tree
	files = [/Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/107binaryTreeLevelOrderTraversalII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/108convertSortedArrayToBinarySearchTree.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/109convertSortedListToBinarySearchTree.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/173binarySearchTreeIterator.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/199binaryTreeRightSideView.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/230KthSmallestElementInBST.go /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/257binaryTreePaths.go]
gopls: /Users/my_user@domain.com/Documents/learngo/src/side_project_golang/leetcode400/tree/113pathSumII.go:14:5: no identifier found

@stamblerre
Copy link
Contributor

It looks like you get a "no identifier found" error in both cases - which symbol are you trying to go to the definition of? Earlier in the thread, it seemed like you were going to the definition of the path variable, which I am able to get to the definition of with line 9, column 10.

@wzhan366
Copy link
Author

thanks for the follow-up.

I was trying to get a definition on f variable.

I followed up your idea that these might be caused by the @ at my path. I created a new account on my macOS. Now my $HOME is /Users/ianzhang. In this way, I can use the gopls v0.3.2 without issue.

@stamblerre
Copy link
Contributor

I am able to get the definition of f by running gopls -rpc.trace -v query definition path/to/file.go:14:2. But that's good to know that removing the @ fixed it - I will add a test case in the gopls code to confirm that this is a bug on our end.

@stamblerre
Copy link
Contributor

Thanks for letting me know. I was able to reproduce this - filed golang/go#37231 so we'll fix this in the next version of gopls.

@wzhan366
Copy link
Author

thanks for fixing it.

@bhcleek
Copy link
Collaborator

bhcleek commented Feb 21, 2020

I'm going to close this since the solution is with gopls, has already landed, and is only pending release.

@bhcleek bhcleek closed this as completed Feb 21, 2020
@konart
Copy link

konart commented Apr 9, 2020

golang/go#33030 (comment) v0.4.0 is finally here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants