repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/args_test.go | vendor/github.com/valyala/fasthttp/args_test.go | package fasthttp
import (
"fmt"
"reflect"
"strings"
"testing"
"time"
)
func TestDecodeArgAppend(t *testing.T) {
testDecodeArgAppend(t, "", "")
testDecodeArgAppend(t, "foobar", "foobar")
testDecodeArgAppend(t, "тест", "тест")
testDecodeArgAppend(t, "a%", "a%")
testDecodeArgAppend(t, "%a%21", "%a!")
testDeco... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/lbclient.go | vendor/github.com/valyala/fasthttp/lbclient.go | package fasthttp
import (
"sync"
"sync/atomic"
"time"
)
// BalancingClient is the interface for clients, which may be passed
// to LBClient.Clients.
type BalancingClient interface {
DoDeadline(req *Request, resp *Response, deadline time.Time) error
PendingRequests() int
}
// LBClient balances requests among ava... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/header.go | vendor/github.com/valyala/fasthttp/header.go | package fasthttp
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"sync/atomic"
"time"
)
// ResponseHeader represents HTTP response header.
//
// It is forbidden copying ResponseHeader instances.
// Create new instances instead and use CopyTo.
//
// ResponseHeader instance MUST NOT be used from concurrently runnin... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/header_test.go | vendor/github.com/valyala/fasthttp/header_test.go | package fasthttp
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"strings"
"testing"
)
func TestResponseHeaderEmptyValueFromHeader(t *testing.T) {
var h1 ResponseHeader
h1.SetContentType("foo/bar")
h1.Set("EmptyValue1", "")
h1.Set("EmptyValue2", " ")
s := h1.String()
var h ResponseHeader
br := bufio.Ne... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fs_handler_example_test.go | vendor/github.com/valyala/fasthttp/fs_handler_example_test.go | package fasthttp_test
import (
"bytes"
"log"
"github.com/valyala/fasthttp"
)
// Setup file handlers (aka 'file server config')
var (
// Handler for serving images from /img/ path,
// i.e. /img/foo/bar.jpg will be served from
// /var/www/images/foo/bar.jpb .
imgPrefix = []byte("/img/")
imgHandler = fasthttp.... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/bytesconv_test.go | vendor/github.com/valyala/fasthttp/bytesconv_test.go | package fasthttp
import (
"bufio"
"bytes"
"fmt"
"net"
"testing"
"time"
)
func TestAppendHTMLEscape(t *testing.T) {
testAppendHTMLEscape(t, "", "")
testAppendHTMLEscape(t, "<", "<")
testAppendHTMLEscape(t, "a", "a")
testAppendHTMLEscape(t, `><"''`, "><"''")
testAppendHTMLEscape(t, "fo<... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stream_test.go | vendor/github.com/valyala/fasthttp/stream_test.go | package fasthttp
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"testing"
"time"
)
func TestNewStreamReader(t *testing.T) {
ch := make(chan struct{})
r := NewStreamReader(func(w *bufio.Writer) {
fmt.Fprintf(w, "Hello, world\n")
fmt.Fprintf(w, "Line #2\n")
close(ch)
})
data, err := ioutil.ReadAll(r)
if err ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/strings.go | vendor/github.com/valyala/fasthttp/strings.go | package fasthttp
var (
defaultServerName = []byte("fasthttp")
defaultUserAgent = []byte("fasthttp")
defaultContentType = []byte("text/plain; charset=utf-8")
)
var (
strSlash = []byte("/")
strSlashSlash = []byte("//")
strSlashDotDot = []byte("/..")
strSlashDotSlash = []byte("/./")
s... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/args_timing_test.go | vendor/github.com/valyala/fasthttp/args_timing_test.go | package fasthttp
import (
"bytes"
"testing"
)
func BenchmarkArgsParse(b *testing.B) {
s := []byte("foo=bar&baz=qqq&aaaaa=bbbb")
b.RunParallel(func(pb *testing.PB) {
var a Args
for pb.Next() {
a.ParseBytes(s)
}
})
}
func BenchmarkArgsPeek(b *testing.B) {
value := []byte("foobarbaz1234")
key := "foobar... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/cookie.go | vendor/github.com/valyala/fasthttp/cookie.go | package fasthttp
import (
"bytes"
"errors"
"io"
"sync"
"time"
)
var zeroTime time.Time
var (
// CookieExpireDelete may be set on Cookie.Expire for expiring the given cookie.
CookieExpireDelete = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
// CookieExpireUnlimited indicates that the cookie does... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/bytesconv.go | vendor/github.com/valyala/fasthttp/bytesconv.go | package fasthttp
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"math"
"net"
"reflect"
"strings"
"sync"
"time"
"unsafe"
)
// AppendHTMLEscape appends html-escaped s to dst and returns the extended dst.
func AppendHTMLEscape(dst []byte, s string) []byte {
if strings.IndexByte(s, '<') < 0 &&
strings.IndexB... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fs_test.go | vendor/github.com/valyala/fasthttp/fs_test.go | package fasthttp
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"math/rand"
"os"
"path"
"sort"
"testing"
"time"
)
func TestNewVHostPathRewriter(t *testing.T) {
var ctx RequestCtx
var req Request
req.Header.SetHost("foobar.com")
req.SetRequestURI("/foo/bar/baz")
ctx.Init(&req, nil, nil)
f := NewVHos... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/bytesconv_timing_test.go | vendor/github.com/valyala/fasthttp/bytesconv_timing_test.go | package fasthttp
import (
"bufio"
"html"
"net"
"testing"
)
func BenchmarkAppendHTMLEscape(b *testing.B) {
sOrig := "<b>foobarbazxxxyyyzzz</b>"
sExpected := string(AppendHTMLEscape(nil, sOrig))
b.RunParallel(func(pb *testing.PB) {
var buf []byte
for pb.Next() {
for i := 0; i < 10; i++ {
buf = AppendH... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/nocopy.go | vendor/github.com/valyala/fasthttp/nocopy.go | package fasthttp
// Embed this type into a struct, which mustn't be copied,
// so `go vet` gives a warning if this struct is copied.
//
// See https://github.com/golang/go/issues/8005#issuecomment-190753527 for details.
type noCopy struct{}
func (*noCopy) Lock() {}
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/header_timing_test.go | vendor/github.com/valyala/fasthttp/header_timing_test.go | package fasthttp
import (
"bufio"
"bytes"
"io"
"testing"
)
var strFoobar = []byte("foobar.com")
type benchReadBuf struct {
s []byte
n int
}
func (r *benchReadBuf) Read(p []byte) (int, error) {
if r.n == len(r.s) {
return 0, io.EOF
}
n := copy(p, r.s[r.n:])
r.n += n
return n, nil
}
func BenchmarkReque... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/userdata.go | vendor/github.com/valyala/fasthttp/userdata.go | package fasthttp
import (
"io"
)
type userDataKV struct {
key []byte
value interface{}
}
type userData []userDataKV
func (d *userData) Set(key string, value interface{}) {
args := *d
n := len(args)
for i := 0; i < n; i++ {
kv := &args[i]
if string(kv.key) == key {
kv.value = value
return
}
}
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/bytebuffer.go | vendor/github.com/valyala/fasthttp/bytebuffer.go | package fasthttp
import (
"github.com/valyala/bytebufferpool"
)
// ByteBuffer provides byte buffer, which can be used with fasthttp API
// in order to minimize memory allocations.
//
// ByteBuffer may be used with functions appending data to the given []byte
// slice. See example code for details.
//
// Use AcquireB... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/uri_test.go | vendor/github.com/valyala/fasthttp/uri_test.go | package fasthttp
import (
"bytes"
"fmt"
"testing"
"time"
)
func TestURICopyToQueryArgs(t *testing.T) {
var u URI
a := u.QueryArgs()
a.Set("foo", "bar")
var u1 URI
u.CopyTo(&u1)
a1 := u1.QueryArgs()
if string(a1.Peek("foo")) != "bar" {
t.Fatalf("unexpected query args value %q. Expecting %q", a1.Peek("fo... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/lbclient_example_test.go | vendor/github.com/valyala/fasthttp/lbclient_example_test.go | package fasthttp_test
import (
"fmt"
"log"
"github.com/valyala/fasthttp"
)
func ExampleLBClient() {
// Requests will be spread among these servers.
servers := []string{
"google.com:80",
"foobar.com:8080",
"127.0.0.1:123",
}
// Prepare clients for each server
var lbc fasthttp.LBClient
for _, addr := r... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/http_test.go | vendor/github.com/valyala/fasthttp/http_test.go | package fasthttp
import (
"bufio"
"bytes"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"strings"
"testing"
"time"
)
func TestResponseBodyStreamDeflate(t *testing.T) {
body := createFixedBody(1e5)
// Verifies https://github.com/valyala/fasthttp/issues/176
// when Content-Length is explicitly set.
testResponse... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/server.go | vendor/github.com/valyala/fasthttp/server.go | package fasthttp
import (
"bufio"
"crypto/tls"
"errors"
"fmt"
"io"
"log"
"mime/multipart"
"net"
"os"
"strings"
"sync"
"sync/atomic"
"time"
)
// ServeConn serves HTTP requests from the given connection
// using the given handler.
//
// ServeConn returns nil if all requests from the c are successfully serv... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/peripconn_test.go | vendor/github.com/valyala/fasthttp/peripconn_test.go | package fasthttp
import (
"testing"
)
func TestIPxUint32(t *testing.T) {
testIPxUint32(t, 0)
testIPxUint32(t, 10)
testIPxUint32(t, 0x12892392)
}
func testIPxUint32(t *testing.T, n uint32) {
ip := uint322ip(n)
nn := ip2uint32(ip)
if n != nn {
t.Fatalf("Unexpected value=%d for ip=%s. Expected %d", nn, ip, n)
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/http.go | vendor/github.com/valyala/fasthttp/http.go | package fasthttp
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"mime/multipart"
"os"
"sync"
"github.com/valyala/bytebufferpool"
)
// Request represents HTTP request.
//
// It is forbidden copying Request instances. Create new instances
// and use CopyTo instead.
//
// Request instance MUST NOT be used from c... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/args.go | vendor/github.com/valyala/fasthttp/args.go | package fasthttp
import (
"bytes"
"errors"
"io"
"sync"
)
// AcquireArgs returns an empty Args object from the pool.
//
// The returned Args may be returned to the pool with ReleaseArgs
// when no longer needed. This allows reducing GC load.
func AcquireArgs() *Args {
return argsPool.Get().(*Args)
}
// ReleaseAr... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/tcpdialer.go | vendor/github.com/valyala/fasthttp/tcpdialer.go | package fasthttp
import (
"errors"
"net"
"strconv"
"sync"
"sync/atomic"
"time"
)
// Dial dials the given TCP addr using tcp4.
//
// This function has the following additional features comparing to net.Dial:
//
// * It reduces load on DNS resolver by caching resolved TCP addressed
// for DefaultDNSCacheDur... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/bytesconv_32.go | vendor/github.com/valyala/fasthttp/bytesconv_32.go | // +build !amd64,!arm64,!ppc64
package fasthttp
const (
maxIntChars = 9
maxHexIntChars = 7
)
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/cookie_timing_test.go | vendor/github.com/valyala/fasthttp/cookie_timing_test.go | package fasthttp
import (
"testing"
)
func BenchmarkCookieParseMin(b *testing.B) {
var c Cookie
s := []byte("xxx=yyy")
for i := 0; i < b.N; i++ {
if err := c.ParseBytes(s); err != nil {
b.Fatalf("unexpected error when parsing cookies: %s", err)
}
}
}
func BenchmarkCookieParseNoExpires(b *testing.B) {
va... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/server_example_test.go | vendor/github.com/valyala/fasthttp/server_example_test.go | package fasthttp_test
import (
"fmt"
"log"
"math/rand"
"net"
"time"
"github.com/valyala/fasthttp"
)
func ExampleListenAndServe() {
// The server will listen for incoming requests on this address.
listenAddr := "127.0.0.1:80"
// This function will be called by the server for each incoming request.
//
// R... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/header_regression_test.go | vendor/github.com/valyala/fasthttp/header_regression_test.go | package fasthttp
import (
"bufio"
"bytes"
"fmt"
"strings"
"testing"
)
func TestIssue28ResponseWithoutBodyNoContentType(t *testing.T) {
var r Response
// Empty response without content-type
s := r.String()
if strings.Contains(s, "Content-Type") {
t.Fatalf("unexpected Content-Type found in response header w... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stream_timing_test.go | vendor/github.com/valyala/fasthttp/stream_timing_test.go | package fasthttp
import (
"bufio"
"io"
"testing"
"time"
)
func BenchmarkStreamReader1(b *testing.B) {
benchmarkStreamReader(b, 1)
}
func BenchmarkStreamReader10(b *testing.B) {
benchmarkStreamReader(b, 10)
}
func BenchmarkStreamReader100(b *testing.B) {
benchmarkStreamReader(b, 100)
}
func BenchmarkStreamRe... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/coarseTime.go | vendor/github.com/valyala/fasthttp/coarseTime.go | package fasthttp
import (
"sync/atomic"
"time"
)
// CoarseTimeNow returns the current time truncated to the nearest second.
//
// This is a faster alternative to time.Now().
func CoarseTimeNow() time.Time {
tp := coarseTime.Load().(*time.Time)
return *tp
}
func init() {
t := time.Now().Truncate(time.Second)
co... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/uri_windows_test.go | vendor/github.com/valyala/fasthttp/uri_windows_test.go | // +build windows
package fasthttp
import "testing"
func TestURIPathNormalizeIssue86(t *testing.T) {
// see https://github.com/valyala/fasthttp/issues/86
var u URI
testURIPathNormalize(t, &u, `C:\a\b\c\fs.go`, `C:\a\b\c\fs.go`)
}
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/doc.go | vendor/github.com/valyala/fasthttp/doc.go | /*
Package fasthttp provides fast HTTP server and client API.
Fasthttp provides the following features:
* Optimized for speed. Easily handles more than 100K qps and more than 1M
concurrent keep-alive connections on modern hardware.
* Optimized for low memory usage.
* Easy 'Connection: Upgrade' suppo... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fs.go | vendor/github.com/valyala/fasthttp/fs.go | package fasthttp
import (
"bytes"
"errors"
"fmt"
"html"
"io"
"io/ioutil"
"mime"
"net/http"
"os"
"path/filepath"
"sort"
"strings"
"sync"
"time"
"github.com/klauspost/compress/gzip"
)
// ServeFileBytesUncompressed returns HTTP response containing file contents
// from the given path.
//
// Directory con... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/bytesconv_64.go | vendor/github.com/valyala/fasthttp/bytesconv_64.go | // +build amd64 arm64 ppc64
package fasthttp
const (
maxIntChars = 18
maxHexIntChars = 15
)
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/uri_timing_test.go | vendor/github.com/valyala/fasthttp/uri_timing_test.go | package fasthttp
import (
"testing"
)
func BenchmarkURIParsePath(b *testing.B) {
benchmarkURIParse(b, "google.com", "/foo/bar")
}
func BenchmarkURIParsePathQueryString(b *testing.B) {
benchmarkURIParse(b, "google.com", "/foo/bar?query=string&other=value")
}
func BenchmarkURIParsePathQueryStringHash(b *testing.B)... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/compress_test.go | vendor/github.com/valyala/fasthttp/compress_test.go | package fasthttp
import (
"bytes"
"fmt"
"io/ioutil"
"testing"
"time"
)
var compressTestcases = func() []string {
a := []string{
"",
"foobar",
"выфаодлодл одлфываыв sd2 k34",
}
bigS := createFixedBody(1e4)
a = append(a, string(bigS))
return a
}()
func TestGzipBytesSerial(t *testing.T) {
if err := tes... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/client_timing_test.go | vendor/github.com/valyala/fasthttp/client_timing_test.go | package fasthttp
import (
"bytes"
"fmt"
"io/ioutil"
"net"
"net/http"
"runtime"
"strings"
"sync"
"sync/atomic"
"testing"
"time"
"github.com/valyala/fasthttp/fasthttputil"
)
type fakeClientConn struct {
net.Conn
s []byte
n int
ch chan struct{}
}
func (c *fakeClientConn) Write(b []byte) (int, error) ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttpadaptor/adaptor_test.go | vendor/github.com/valyala/fasthttp/fasthttpadaptor/adaptor_test.go | package fasthttpadaptor
import (
"fmt"
"io/ioutil"
"net"
"net/http"
"net/url"
"reflect"
"testing"
"github.com/valyala/fasthttp"
)
func TestNewFastHTTPHandler(t *testing.T) {
expectedMethod := "POST"
expectedProto := "HTTP/1.1"
expectedProtoMajor := 1
expectedProtoMinor := 1
expectedRequestURI := "/foo/b... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttpadaptor/adaptor.go | vendor/github.com/valyala/fasthttp/fasthttpadaptor/adaptor.go | // Package fasthttpadaptor provides helper functions for converting net/http
// request handlers to fasthttp request handlers.
package fasthttpadaptor
import (
"io"
"net/http"
"net/url"
"github.com/valyala/fasthttp"
)
// NewFastHTTPHandlerFunc wraps net/http handler func to fasthttp
// request handler, so it can... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttputil/pipeconns_test.go | vendor/github.com/valyala/fasthttp/fasthttputil/pipeconns_test.go | package fasthttputil
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net"
"testing"
"time"
)
func TestPipeConnsWriteTimeout(t *testing.T) {
pc := NewPipeConns()
c1 := pc.Conn1()
deadline := time.Now().Add(time.Millisecond)
if err := c1.SetWriteDeadline(deadline); err != nil {
t.Fatalf("unexpected error: %s", e... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttputil/inmemory_listener.go | vendor/github.com/valyala/fasthttp/fasthttputil/inmemory_listener.go | package fasthttputil
import (
"fmt"
"net"
"sync"
)
// InmemoryListener provides in-memory dialer<->net.Listener implementation.
//
// It may be used either for fast in-process client<->server communcations
// without network stack overhead or for client<->server tests.
type InmemoryListener struct {
lock sync.M... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttputil/inmemory_listener_timing_test.go | vendor/github.com/valyala/fasthttp/fasthttputil/inmemory_listener_timing_test.go | package fasthttputil_test
import (
"crypto/tls"
"net"
"testing"
"github.com/valyala/fasthttp"
"github.com/valyala/fasthttp/fasthttputil"
)
// BenchmarkPlainStreaming measures end-to-end plaintext streaming performance
// for fasthttp client and server.
//
// It issues http requests over a small number of keep-a... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttputil/doc.go | vendor/github.com/valyala/fasthttp/fasthttputil/doc.go | // Package fasthttputil provides utility functions for fasthttp.
package fasthttputil
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttputil/inmemory_listener_test.go | vendor/github.com/valyala/fasthttp/fasthttputil/inmemory_listener_test.go | package fasthttputil
import (
"bytes"
"fmt"
"testing"
"time"
)
func TestInmemoryListener(t *testing.T) {
ln := NewInmemoryListener()
ch := make(chan struct{})
for i := 0; i < 10; i++ {
go func(n int) {
conn, err := ln.Dial()
if err != nil {
t.Fatalf("unexpected error: %s", err)
}
defer conn.... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/fasthttputil/pipeconns.go | vendor/github.com/valyala/fasthttp/fasthttputil/pipeconns.go | package fasthttputil
import (
"errors"
"io"
"net"
"sync"
"time"
)
// NewPipeConns returns new bi-directonal connection pipe.
func NewPipeConns() *PipeConns {
ch1 := make(chan *byteBuffer, 4)
ch2 := make(chan *byteBuffer, 4)
pc := &PipeConns{
stopCh: make(chan struct{}),
}
pc.c1.rCh = ch1
pc.c1.wCh = ch2... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stackless/writer_test.go | vendor/github.com/valyala/fasthttp/stackless/writer_test.go | package stackless
import (
"bytes"
"compress/flate"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"testing"
"time"
)
func TestCompressFlateSerial(t *testing.T) {
if err := testCompressFlate(); err != nil {
t.Fatalf("unexpected error: %s", err)
}
}
func TestCompressFlateConcurrent(t *testing.T) {
if err := test... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stackless/writer.go | vendor/github.com/valyala/fasthttp/stackless/writer.go | package stackless
import (
"errors"
"fmt"
"github.com/valyala/bytebufferpool"
"io"
)
// Writer is an interface stackless writer must conform to.
//
// The interface contains common subset for Writers from compress/* packages.
type Writer interface {
Write(p []byte) (int, error)
Flush() error
Close() error
Res... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stackless/func_test.go | vendor/github.com/valyala/fasthttp/stackless/func_test.go | package stackless
import (
"fmt"
"sync/atomic"
"testing"
"time"
)
func TestNewFuncSimple(t *testing.T) {
var n uint64
f := NewFunc(func(ctx interface{}) {
atomic.AddUint64(&n, uint64(ctx.(int)))
})
iterations := 4 * 1024
for i := 0; i < iterations; i++ {
if !f(2) {
t.Fatalf("f mustn't return false")
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stackless/func.go | vendor/github.com/valyala/fasthttp/stackless/func.go | package stackless
import (
"runtime"
"sync"
)
// NewFunc returns stackless wrapper for the function f.
//
// Unlike f, the returned stackless wrapper doesn't use stack space
// on the goroutine that calls it.
// The wrapper may save a lot of stack space if the following conditions
// are met:
//
// - f doesn't ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stackless/func_timing_test.go | vendor/github.com/valyala/fasthttp/stackless/func_timing_test.go | package stackless
import (
"sync/atomic"
"testing"
)
func BenchmarkFuncOverhead(b *testing.B) {
var n uint64
f := NewFunc(func(ctx interface{}) {
atomic.AddUint64(&n, *(ctx.(*uint64)))
})
b.RunParallel(func(pb *testing.PB) {
x := uint64(1)
for pb.Next() {
if !f(&x) {
b.Fatalf("f mustn't return fals... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/valyala/fasthttp/stackless/doc.go | vendor/github.com/valyala/fasthttp/stackless/doc.go | // Package stackless provides functionality that may save stack space
// for high number of concurrently running goroutines.
package stackless
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-querystring/query/encode.go | vendor/github.com/google/go-querystring/query/encode.go | // Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package query implements encoding of structs into URL query parameters.
//
// As a simple example:
//
// type Options struct {
// Query string `url:"q"`... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-querystring/query/encode_test.go | vendor/github.com/google/go-querystring/query/encode_test.go | // Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package query
import (
"fmt"
"net/url"
"reflect"
"testing"
"time"
)
type Nested struct {
A SubNested `url:"a"`
B *SubNested `url:"b"`
Ptr *SubNes... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/unsafe_panic.go | vendor/github.com/google/go-cmp/cmp/unsafe_panic.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build purego appengine js
package cmp
import "reflect"
const supportAllowUnexported = false
func unsafeRetrieveField(reflect.Value, reflect.StructFi... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/compare_test.go | vendor/github.com/google/go-cmp/cmp/compare_test.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmp_test
import (
"bytes"
"crypto/md5"
"encoding/json"
"fmt"
"io"
"math"
"math/rand"
"reflect"
"regexp"
"sort"
"strings"
"sync"
"testi... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/path.go | vendor/github.com/google/go-cmp/cmp/path.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmp
import (
"fmt"
"reflect"
"strings"
"unicode"
"unicode/utf8"
)
type (
// Path is a list of PathSteps describing the sequence of operation... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/compare.go | vendor/github.com/google/go-cmp/cmp/compare.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// Package cmp determines equality of values.
//
// This package is intended to be a more powerful and safer alternative to
// reflect.DeepEqual for compari... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/reporter.go | vendor/github.com/google/go-cmp/cmp/reporter.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmp
import (
"fmt"
"reflect"
"strings"
"github.com/google/go-cmp/cmp/internal/value"
)
type defaultReporter struct {
Option
diffs []string... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/example_test.go | vendor/github.com/google/go-cmp/cmp/example_test.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmp_test
import (
"fmt"
"math"
"reflect"
"sort"
"strings"
"github.com/google/go-cmp/cmp"
)
// TODO: Re-write these examples in terms of how... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/options_test.go | vendor/github.com/google/go-cmp/cmp/options_test.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmp
import (
"io"
"reflect"
"strings"
"testing"
ts "github.com/google/go-cmp/cmp/internal/teststructs"
)
// Test that the creation of Option... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/options.go | vendor/github.com/google/go-cmp/cmp/options.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmp
import (
"fmt"
"reflect"
"runtime"
"strings"
"github.com/google/go-cmp/cmp/internal/function"
)
// Option configures for specific behavi... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/unsafe_reflect.go | vendor/github.com/google/go-cmp/cmp/unsafe_reflect.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build !purego,!appengine,!js
package cmp
import (
"reflect"
"unsafe"
)
const supportAllowUnexported = true
// unsafeRetrieveField uses unsafe to f... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/testprotos/protos.go | vendor/github.com/google/go-cmp/cmp/internal/testprotos/protos.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package testprotos
func Equal(x, y Message) bool {
if x == nil || y == nil {
return x == nil && y == nil
}
return x.String() == y.String()
}
type Mes... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go | vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build !debug
package diff
var debug debugger
type debugger struct{}
func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc {
retu... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go | vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build debug
package diff
import (
"fmt"
"strings"
"sync"
"time"
)
// The algorithm can be seen running in real-time by enabling debugging:
// go ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go | vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// Package diff implements an algorithm for producing edit-scripts.
// The edit-script is a sequence of operations needed to transform one list
// of symbol... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/diff/diff_test.go | vendor/github.com/google/go-cmp/cmp/internal/diff/diff_test.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package diff
import (
"fmt"
"math/rand"
"strings"
"testing"
"unicode"
)
func TestDifference(t *testing.T) {
tests := []struct {
// Before passing ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go | vendor/github.com/google/go-cmp/cmp/internal/value/sort.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package value
import (
"fmt"
"math"
"reflect"
"sort"
)
// SortKeys sorts a list of map keys, deduplicating keys if necessary.
// The type of each valu... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go | vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go | // Copyright 2018, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build !purego
package value
import (
"reflect"
"unsafe"
)
// Pointer is an opaque typed pointer and is guaranteed to be comparable.
type Pointer st... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go | vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go | // Copyright 2018, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build purego
package value
import "reflect"
// Pointer is an opaque typed pointer and is guaranteed to be comparable.
type Pointer struct {
p uintpt... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/value/format.go | vendor/github.com/google/go-cmp/cmp/internal/value/format.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// Package value provides functionality for reflect.Value types.
package value
import (
"fmt"
"reflect"
"strconv"
"strings"
"unicode"
)
var stringerI... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/value/format_test.go | vendor/github.com/google/go-cmp/cmp/internal/value/format_test.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package value
import (
"bytes"
"io"
"reflect"
"testing"
)
func TestFormat(t *testing.T) {
type key struct {
a int
b string
c chan bool
}
tes... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/value/sort_test.go | vendor/github.com/google/go-cmp/cmp/internal/value/sort_test.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package value_test
import (
"math"
"reflect"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/internal/value"
)
func TestSortK... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project3.go | vendor/github.com/google/go-cmp/cmp/internal/teststructs/project3.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package teststructs
import (
"sync"
pb "github.com/google/go-cmp/cmp/internal/testprotos"
)
// This is an sanitized example of equality from a real use... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project2.go | vendor/github.com/google/go-cmp/cmp/internal/teststructs/project2.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package teststructs
import (
"time"
pb "github.com/google/go-cmp/cmp/internal/testprotos"
)
// This is an sanitized example of equality from a real use... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project1.go | vendor/github.com/google/go-cmp/cmp/internal/teststructs/project1.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package teststructs
import (
"time"
pb "github.com/google/go-cmp/cmp/internal/testprotos"
)
// This is an sanitized example of equality from a real use... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/teststructs/structs.go | vendor/github.com/google/go-cmp/cmp/internal/teststructs/structs.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package teststructs
type InterfaceA interface {
InterfaceA()
}
type (
StructA struct{ X string } // Equal method on value receiver
StructB struct{ X st... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/teststructs/project4.go | vendor/github.com/google/go-cmp/cmp/internal/teststructs/project4.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package teststructs
import (
"time"
pb "github.com/google/go-cmp/cmp/internal/testprotos"
)
// This is an sanitized example of equality from a real use... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/internal/function/func.go | vendor/github.com/google/go-cmp/cmp/internal/function/func.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// Package function identifies function types.
package function
import "reflect"
type funcType int
const (
_ funcType = iota
ttbFunc // func(T, T) boo... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/xform.go | vendor/github.com/google/go-cmp/cmp/cmpopts/xform.go | // Copyright 2018, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmpopts
import (
"github.com/google/go-cmp/cmp"
)
type xformFilter struct{ xform cmp.Option }
func (xf xformFilter) filter(p cmp.Path) bool {
f... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go | vendor/github.com/google/go-cmp/cmp/cmpopts/sort.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmpopts
import (
"fmt"
"reflect"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/internal/function"
)
// SortSlices returns a Tr... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go18.go | vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go18.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build go1.8
package cmpopts
import (
"reflect"
"sort"
)
const hasReflectStructOf = true
func mapEntryType(t reflect.Type) reflect.Type {
return r... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go17.go | vendor/github.com/google/go-cmp/cmp/cmpopts/sort_go17.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// +build !go1.8
package cmpopts
import (
"reflect"
"sort"
)
const hasReflectStructOf = false
func mapEntryType(reflect.Type) reflect.Type {
return r... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/ignore.go | vendor/github.com/google/go-cmp/cmp/cmpopts/ignore.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmpopts
import (
"fmt"
"reflect"
"unicode"
"unicode/utf8"
"github.com/google/go-cmp/cmp"
)
// IgnoreFields returns an Option that ignores ex... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go | vendor/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmpopts
import (
"fmt"
"reflect"
"strings"
"github.com/google/go-cmp/cmp"
)
// filterField returns a new Option where opt is only evaluated o... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go | vendor/github.com/google/go-cmp/cmp/cmpopts/equate.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
// Package cmpopts provides common options for the cmp package.
package cmpopts
import (
"math"
"reflect"
"github.com/google/go-cmp/cmp"
)
func equate... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/google/go-cmp/cmp/cmpopts/util_test.go | vendor/github.com/google/go-cmp/cmp/cmpopts/util_test.go | // Copyright 2017, The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
package cmpopts
import (
"bytes"
"fmt"
"io"
"math"
"reflect"
"strings"
"sync"
"testing"
"time"
"github.com/google/go-cmp/cmp"
)
type (
MyInt ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/init.go | vendor/github.com/smartystreets/goconvey/convey/init.go | package convey
import (
"flag"
"os"
"github.com/jtolds/gls"
"github.com/smartystreets/assertions"
"github.com/smartystreets/goconvey/convey/reporting"
)
func init() {
assertions.GoConveyMode(true)
declareFlags()
ctxMgr = gls.NewContextManager()
}
func declareFlags() {
flag.BoolVar(&json, "convey-json", f... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/focused_execution_test.go | vendor/github.com/smartystreets/goconvey/convey/focused_execution_test.go | package convey
import "testing"
func TestFocusOnlyAtTopLevel(t *testing.T) {
output := prepare()
FocusConvey("hi", t, func() {
output += "done"
})
expectEqual(t, "done", output)
}
func TestFocus(t *testing.T) {
output := prepare()
FocusConvey("hi", t, func() {
output += "1"
Convey("bye", func() {
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/isolated_execution_test.go | vendor/github.com/smartystreets/goconvey/convey/isolated_execution_test.go | package convey
import (
"strconv"
"testing"
"time"
)
func TestSingleScope(t *testing.T) {
output := prepare()
Convey("hi", t, func() {
output += "done"
})
expectEqual(t, "done", output)
}
func TestSingleScopeWithMultipleConveys(t *testing.T) {
output := prepare()
Convey("1", t, func() {
output += "1"... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/reporting_hooks_test.go | vendor/github.com/smartystreets/goconvey/convey/reporting_hooks_test.go | package convey
import (
"fmt"
"net/http"
"net/http/httptest"
"path"
"runtime"
"strconv"
"strings"
"testing"
"github.com/smartystreets/goconvey/convey/reporting"
)
func TestSingleScopeReported(t *testing.T) {
myReporter, test := setupFakeReporter()
Convey("A", test, func() {
So(1, ShouldEqual, 1)
})
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/assertions.go | vendor/github.com/smartystreets/goconvey/convey/assertions.go | package convey
import "github.com/smartystreets/assertions"
var (
ShouldEqual = assertions.ShouldEqual
ShouldNotEqual = assertions.ShouldNotEqual
ShouldAlmostEqual = assertions.ShouldAlmostEqual
ShouldNotAlmostEqual = assertions.ShouldNotAlmostEqual
ShouldResemble = assertions.ShouldResem... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/context.go | vendor/github.com/smartystreets/goconvey/convey/context.go | package convey
import (
"fmt"
"github.com/jtolds/gls"
"github.com/smartystreets/goconvey/convey/reporting"
)
type conveyErr struct {
fmt string
params []interface{}
}
func (e *conveyErr) Error() string {
return fmt.Sprintf(e.fmt, e.params...)
}
func conveyPanic(fmt string, params ...interface{}) {
panic(... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/discovery.go | vendor/github.com/smartystreets/goconvey/convey/discovery.go | package convey
type actionSpecifier uint8
const (
noSpecifier actionSpecifier = iota
skipConvey
focusConvey
)
type suite struct {
Situation string
Test t
Focus bool
Func func(C) // nil means skipped
FailMode FailureMode
}
func newSuite(situation string, failureMode FailureMode, f func(C), tes... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/doc.go | vendor/github.com/smartystreets/goconvey/convey/doc.go | // Package convey contains all of the public-facing entry points to this project.
// This means that it should never be required of the user to import any other
// packages from this project as they serve internal purposes.
package convey
import "github.com/smartystreets/goconvey/convey/reporting"
///////////////////... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/story_conventions_test.go | vendor/github.com/smartystreets/goconvey/convey/story_conventions_test.go | package convey
import (
"reflect"
"testing"
)
func expectPanic(t *testing.T, f string) interface{} {
r := recover()
if r != nil {
if cp, ok := r.(*conveyErr); ok {
if cp.fmt != f {
t.Error("Incorrect panic message.")
}
} else {
t.Errorf("Incorrect panic type. %s", reflect.TypeOf(r))
}
} else {... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/nilReporter.go | vendor/github.com/smartystreets/goconvey/convey/nilReporter.go | package convey
import (
"github.com/smartystreets/goconvey/convey/reporting"
)
type nilReporter struct{}
func (self *nilReporter) BeginStory(story *reporting.StoryReport) {}
func (self *nilReporter) Enter(scope *reporting.ScopeReport) {}
func (self *nilReporter) Report(report *reporting.AssertionResult) {}
f... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/reporting/gotest.go | vendor/github.com/smartystreets/goconvey/convey/reporting/gotest.go | package reporting
type gotestReporter struct{ test T }
func (self *gotestReporter) BeginStory(story *StoryReport) {
self.test = story.Test
}
func (self *gotestReporter) Enter(scope *ScopeReport) {}
func (self *gotestReporter) Report(r *AssertionResult) {
if !passed(r) {
self.test.Fail()
}
}
func (self *gotest... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/smartystreets/goconvey/convey/reporting/json.go | vendor/github.com/smartystreets/goconvey/convey/reporting/json.go | // TODO: under unit test
package reporting
import (
"bytes"
"encoding/json"
"fmt"
"strings"
)
type JsonReporter struct {
out *Printer
currentKey []string
current *ScopeResult
index map[string]*ScopeResult
scopes []*ScopeResult
}
func (self *JsonReporter) depth() int { return len(self.cur... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.