I hereby claim:
- I am cep21 on github.
- I am cep21 (https://keybase.io/cep21) on keybase.
- I have a public key ASAwNIEREtDh3M0e-0fmJBK5AlukNaSfZzfs3spchpbB2Qo
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"net/http/httptest" | |
"net/http/httptrace" | |
"os" | |
) |
type roundTripFunc func (r *http.Request) (*http.Response, error) | |
func (s roundTripFunc) RoundTrip(r *http.Request) (*http.Response, error) { | |
return s(r) | |
} | |
func TestSword(t *testing.T) { | |
var c Client | |
c.Client.Transport = roundTripFunc(func(r *http.Request) (*http.Response, error) { | |
assert.Equal(t, r.URL.Path, "/v1/item/sword") |
package goexperiments | |
import ( | |
"context" | |
"net/http" | |
) | |
type HandlerMiddleware interface { | |
HandleHTTPC(ctx context.Context, rw http.ResponseWriter, req *http.Request, next http.Handler) | |
} |
package main | |
import ( | |
"testing" | |
"sync" | |
) | |
func TestAppend(t *testing.T) { | |
x := make([]string, 0, 6) |
package main | |
import ( | |
"sync" | |
"testing" | |
) | |
func TestAppend(t *testing.T) { | |
x := []string{"start"} |
I hereby claim:
To claim this, I am signing this object:
package main | |
// Given an interface | |
type I interface { | |
Func() | |
} | |
// And another interface | |
type I2 interface { | |
Another() |
type Ship2 struct { | |
GameKillable | |
PhysicalObject | |
} | |
type PhysicalObject struct { | |
LocX float64 | |
LocY float64 | |
Size float64 | |
} |
type Ship struct { | |
Health int | |
LocX float64 | |
LocY float64 | |
Size float64 | |
} | |
func (s *Ship) Heal(amnt int) { | |
if s.Health >= 0 { | |
s.Health += amnt |
package goexperiments | |
import ( | |
"context" | |
"net/http" | |
) | |
type HandlerMiddleware interface { | |
HandleHTTPC(ctx context.Context, rw http.ResponseWriter, req *http.Request, next http.Handler) | |
} |