Skip to content

Instantly share code, notes, and snippets.

Josh Bleecher Snyder josharian

View GitHub Profile
View gist:cba98a51403692ce00dcda156bd13af2
digraph {
rankdir=LR;
"github.com/josharian/depcut";
"bytes";
"errors";
"internal/bytealg";
"internal/cpu";
"unsafe";
"io";
"sync";
View x_test.go
package p
import (
_ "net/http"
"testing"
_ "unsafe"
)
//go:linkname _initdone net/http.initdone·
var _initdone uint8
View git2go_runtime_crash.go
package main
import (
"os"
git "gopkg.in/libgit2/git2go.v26"
)
func main() {
pwd, err := os.Getwd()
View git-whose-tree.go
package main
import (
"flag"
"fmt"
"log"
"os"
git "gopkg.in/libgit2/git2go.v26"
)
View gen_git2go_enum.go
package main
import (
"bytes"
"flag"
"fmt"
"os"
"strings"
"github.com/go-clang/v3.9/clang"
View gist:2e8e8ba23a99317820291b30b47a64fb
package main
import (
"bytes"
"flag"
"fmt"
"os"
"strings"
"github.com/go-clang/v3.9/clang"
@josharian
josharian / issue16122_test.go
Created May 16, 2017
extract for go issue 16122
View issue16122_test.go
/*
Copyright 2011-2013 Frederic Langlet
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
you may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
View _cgo_gotypes.go
//go:cgo_ldflag "-g"
//go:cgo_ldflag "-O2"
//go:cgo_ldflag "-L/usr/local/Cellar/glib/2.52.0/lib"
//go:cgo_ldflag "-L/usr/local/opt/gettext/lib"
//go:cgo_ldflag "-lgobject-2.0"
//go:cgo_ldflag "-lglib-2.0"
//go:cgo_ldflag "-lintl"
// Created by cgo - DO NOT EDIT
package glib
View wedge_stacktrace_pkg_net.txt
$ ./net.test -test.short -test.v
=== RUN TestSortByRFC6724
--- PASS: TestSortByRFC6724 (0.00s)
=== RUN TestRFC6724PolicyTableClassify
--- PASS: TestRFC6724PolicyTableClassify (0.00s)
=== RUN TestRFC6724ClassifyScope
--- PASS: TestRFC6724ClassifyScope (0.00s)
=== RUN TestRFC6724CommonPrefixLength
--- PASS: TestRFC6724CommonPrefixLength (0.00s)
=== RUN TestCgoLookupIP
View dtruss_pkg_net.txt
$ sudo dtruss ./net.test -test.short -test.v
Password:
dtrace: system integrity protection is on, some features will not be available
SYSCALL(args) = return
=== RUN TestSortByRFC6724
--- PASS: TestSortByRFC6724 (0.00s)
=== RUN TestRFC6724PolicyTableClassify
--- PASS: TestRFC6724PolicyTableClassify (0.00s)
=== RUN TestRFC6724ClassifyScope
You can’t perform that action at this time.