I hereby claim:
- I am ianfoo on github.
- I am ianfoo (https://keybase.io/ianfoo) on keybase.
- I have a public key whose fingerprint is 9605 BB8A DC1C F60F 48E5 B894 3F50 C56B 291E 447F
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
n= 5 target= 0 slice-search-time: 169ns set-search-time: 309ns | |
n= 5 target= 2 slice-search-time: 82ns set-search-time: 163ns | |
n= 5 target= 5 slice-search-time: 68ns set-search-time: 150ns | |
n= 10 target= 0 slice-search-time: 30ns set-search-time: 145ns | |
n= 10 target= 5 slice-search-time: 60ns set-search-time: 131ns | |
n= 10 target= 10 slice-search-time: 55ns set-search-time: 118ns | |
n= 50 target= 0 slice-search-time: 33ns set-search-time: 67ns | |
n= 50 target= 25 slice-search-time: 55ns set-search-time: 127ns | |
n= 50 target= 50 slice-search-time: 70ns set-search-time: 120ns | |
n= 100 target= 0 slice-search-time: 47ns set-search-time: 76ns |
We can use build tags to run only certain types of tests. In this case, we want integration tests
to run by default, so we tag the integration tests with a negated unit test tag, which indicates
that the test should not be run if the unit
build flag is set.
Alternatively, the integration tests could be tagged with integration
or some other tag, and
they'd only be run if the integration
tag is set on test invocation.
This list has the goal of helping developers interested in contributing to the Go language but are unsure of where to start. This was not generated manually so some functions and methods here may not require examples (maybe because they are too simple, e.g .String()) and some of these may only make sense in a package level example (which are not considered for this list yet). Use your best judgment and check the documentation before you open up a CL to add an example.
You should also search in gerrit for open CLs that are already adding examples.
I will try to keep this list as up to date as possible. If you find any mistakes, please comment below and I will try to fix it.
godoc-server () { | |
declare -lr funcname=$0 | |
declare -lr godoc=$(which godoc) | |
start_server () { | |
declare -lr nohup=$(which gnohup || which nohup) | |
declare -lr logfile="/tmp/godoc-server.log" | |
$nohup $godoc $@ >$logfile 2>&1 & | |
} | |
stop_server() { | |
pkill -fn 'godoc -http' |
// This illustrates how you can call a method on a nil pointer type | |
// if it doesn't dereference the nil value. | |
package main | |
import "fmt" | |
type T int | |
func (t *T) hello() string { |
def dishroom(): | |
return "Dishroom has 24 hour beans." | |
def huh(): | |
return "You cooked beans for 24 hours? What's the matter with you?" | |
def sports(): | |
return "¯\_(ツ)_/¯ Let's go watch sports." |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"strings" | |
) | |
type ErrorList []error |
http://i.imgur.com/FApqk3D.jpg | |
http://i.imgur.com/TKLs9lo.jpg | |
https://i.redd.it/d8021b5i2moy.jpg | |
https://i.redd.it/4m5yk8gjrtzy.jpg | |
https://i.redd.it/xae65ypfqycy.jpg | |
http://i.imgur.com/lcEUZHv.jpg | |
https://i.redd.it/1nlgrn49x7ry.jpg | |
http://i.imgur.com/M3NOzLC.jpg | |
https://i.redd.it/w5q6gldnvcuy.jpg | |
https://i.redd.it/s5viyluv421z.jpg |
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"path" | |
) |