The Famous Billion Dollar Mistake in Go

C:\adam>nvm install 15.8.0 Downloading node.js version 15.8.0 (64-bit)... Complete Creating C:\Users\Administrator\AppData\Roaming\nvm\temp Downloading npm version 7.5.1... Error while downloading https://github.com/npm/cli/archive/v7.5.1.zip - Get "https://github.com/npm/cli/archive/v7.5.1.zip": read tcp 172.31.0.229:59180->20.205.243.166:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x20 pc=0x106a5a7] goroutine 1 [running]: nvm/web.Download(0x11c0e270, 0x2d, 0x11fe2100, 0x3e, 0x11fab3e0, 0x5, 0x0) C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/web/web.go:81 +0x1c7 nvm/web.GetNpm(0x11c0e3f1, 0x2a, 0x11fab3e0, 0x5, 0x11e8087c) C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/web/web.go:209 +0x22e main.install(0x11c0a0c8, 0x6, 0x10e2ad3, 0x2) C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:295 +0x82c main.main() C:/Users/corey/OneDrive/Documents/workspace/oss/coreybutler/nvm-windows/src/nvm.go:86 +0x88f
The idea is really simple and is also used by Rust and C++: add a pointer type that can never be nil.

Comments

Popular posts from this blog

Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader.