Skip to content

Instantly share code, notes, and snippets.

View codyoss's full-sized avatar
🌈
Tweaking my editors colors

Cody Oss codyoss

🌈
Tweaking my editors colors
View GitHub Profile
This file has been truncated, but you can view the full file.
, 0x6c, ...}, ...)
/Users/codyoss/go/pkg/mod/golang.org/x/tools/gopls@v0.12.0-pre.1/internal/lsp/filecache/filecache.go:113 +0x58 fp=0x1402f99bcc0 sp=0x1402f99bc10 pc=0x104ed90f8
golang.org/x/tools/gopls/internal/lsp/cache.(*typeCheckBatch).checkPackage.func1()
/Users/codyoss/go/pkg/mod/golang.org/x/tools/gopls@v0.12.0-pre.1/internal/lsp/cache/check.go:655 +0x394 fp=0x1402f99bfd0 sp=0x1402f99bcc0 pc=0x104ef3764
runtime.goexit()
/usr/local/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x1402f99bfd0 sp=0x1402f99bfd0 pc=0x10483a7f4
created by golang.org/x/tools/gopls/internal/lsp/cache.(*typeCheckBatch).checkPackage
/Users/codyoss/go/pkg/mod/golang.org/x/tools/gopls@v0.12.0-pre.1/internal/lsp/cache/check.go:638 +0x228
goroutine 106718 [runnable]:
@codyoss
codyoss / main.go
Created June 4, 2019 03:59
Accessing Unexported Fields in Go
package main
import (
"fmt"
"strings"
"unsafe"
)
const ptrSize = unsafe.Sizeof(new(int))
@codyoss
codyoss / conversions_test.go
Last active April 7, 2019 06:10
A cool way to save some allocation using unsafe and reflect
package main
import (
"reflect"
"testing"
"unsafe"
)
var (
bytes = []byte("This is a slice of bytes that will eventually get converted to a string.")
@codyoss
codyoss / reflection-pipeline.go
Last active February 14, 2019 05:17
A pipeline built with reflection
package main
import (
"fmt"
"reflect"
)
var steps []interface{}
var input interface{}