Skip to content

Instantly share code, notes, and snippets.

View b5's full-sized avatar
💭
use of moved value

Brendan O'Brien b5

💭
use of moved value
View GitHub Profile
$ go test -v
# gx/ipfs/QmQMdVT3PHEhMbdkANAqjpEmyUpVZEEzZyougpCSYqcjre/go-reuseport
../../../gx/ipfs/QmQMdVT3PHEhMbdkANAqjpEmyUpVZEEzZyougpCSYqcjre/go-reuseport/impl_unix.go:99:16: cannot use sockaddrnet.NetAddrToSockaddr(dialer.LocalAddr) (type "golang.org/x/sys/unix".Sockaddr) as type "gx/ipfs/QmPXvegq26x982cQjSfbTvSzZXn7GiaMwhhVPHkeTEhrPT/sys/unix".Sockaddr in assignment:
"golang.org/x/sys/unix".Sockaddr does not implement "gx/ipfs/QmPXvegq26x982cQjSfbTvSzZXn7GiaMwhhVPHkeTEhrPT/sys/unix".Sockaddr (missing "gx/ipfs/QmPXvegq26x982cQjSfbTvSzZXn7GiaMwhhVPHkeTEhrPT/sys/unix".sockaddr method)
../../../gx/ipfs/QmQMdVT3PHEhMbdkANAqjpEmyUpVZEEzZyougpCSYqcjre/go-reuseport/impl_unix.go:100:17: cannot use sockaddrnet.NetAddrToSockaddr(netAddr) (type "golang.org/x/sys/unix".Sockaddr) as type "gx/ipfs/QmPXvegq26x982cQjSfbTvSzZXn7GiaMwhhVPHkeTEhrPT/sys/unix".Sockaddr in assignment:
"golang.org/x/sys/unix".Sockaddr does not implement "gx/ipfs/QmPXvegq26x982cQjSfbTvSzZXn7GiaMwhhVPHkeTEhrPT/sys/unix".Sockaddr (missing "gx/
@sogko
sogko / go-list-deps.sh
Created May 1, 2015 11:43
A useful terminal command using `go list` to list (non-standard) dependencies in your package directory
go list -f '{{.Deps}}' | tr "[" " " | tr "]" " " | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
@denji
denji / golang-tls.md
Last active April 29, 2024 03:39 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying