"errors"
"fmt"
"io"
- "rand"
+ "math/rand"
"strings"
)
import (
"bytes"
+ "encoding/gob"
"encoding/hex"
"fmt"
- "gob"
"testing"
"testing/quick"
)
import (
"errors"
"io"
- "rand"
+ "math/rand"
)
// An unsigned integer x of the form
import (
"bytes"
+ "encoding/gob"
"fmt"
- "gob"
"testing"
)
import (
"bytes"
+ "encoding/json"
"fmt"
"io"
"io/ioutil"
- "json"
"strings"
"testing"
)
import (
"bytes"
"fmt"
- "rand"
+ "math/rand"
"sort"
)
package net
import (
- "rand"
+ "math/rand"
"sync"
"time"
)
"crypto/tls"
"errors"
"fmt"
- "http"
"io"
"io/ioutil"
"net"
+ "net/http"
+ "net/url"
"os"
"strconv"
"strings"
- "url"
)
// Request returns the HTTP request as represented in the current
import (
"bufio"
- "exec"
"fmt"
- "http"
"io"
"log"
+ "net/http"
"os"
+ "os/exec"
"path/filepath"
"regexp"
"runtime"
import (
"bufio"
- "exec"
"fmt"
- "http"
- "http/httptest"
"io"
"net"
+ "net/http"
+ "net/http/httptest"
"os"
+ "os/exec"
"path/filepath"
"runtime"
"strconv"
import (
"fmt"
- "http"
+ "net/http"
"os"
"testing"
)
"errors"
"fmt"
"io"
+ "net/url"
"strings"
- "url"
)
// A Client is an HTTP client. Its zero value (DefaultClient) is a usable client
"crypto/tls"
"errors"
"fmt"
- . "http"
- "http/httptest"
"io"
"io/ioutil"
"net"
+ . "net/http"
+ "net/http/httptest"
+ "net/url"
"strconv"
"strings"
"testing"
- "url"
)
var robotsTxtHandler = HandlerFunc(func(w ResponseWriter, r *Request) {
package http
import (
+ "encoding/json"
"fmt"
- "json"
"reflect"
"testing"
"time"
import (
"fmt"
- "http"
- "http/cgi"
"io"
"net"
+ "net/http"
+ "net/http/cgi"
"os"
"time"
)
package http_test
import (
- "http"
"io/ioutil"
+ "net/http"
"path/filepath"
"testing"
)
"strconv"
"strings"
"time"
- "utf8"
+ "unicode/utf8"
)
// A Dir implements http.FileSystem using the native file
import (
"fmt"
- . "http"
- "http/httptest"
"io/ioutil"
+ . "net/http"
+ "net/http/httptest"
+ "net/url"
"os"
"path/filepath"
"strings"
"testing"
- "url"
)
const (
import (
"bytes"
- "http"
+ "net/http"
)
// ResponseRecorder is an implementation of http.ResponseWriter that
"crypto/tls"
"flag"
"fmt"
- "http"
"net"
+ "net/http"
"os"
"time"
)
import (
"bufio"
- "http"
"io"
+ "net/http"
"strconv"
"strings"
)
"bytes"
"errors"
"fmt"
- "http"
"io"
"io/ioutil"
"net"
+ "net/http"
"strings"
)
import (
"bytes"
"fmt"
- "http"
"io"
"io/ioutil"
+ "net/http"
+ "net/url"
"testing"
- "url"
)
type dumpTest struct {
import (
"bufio"
"errors"
- "http"
"io"
"net"
+ "net/http"
"net/textproto"
"os"
"sync"
package httputil
import (
- "http"
"io"
"log"
"net"
+ "net/http"
+ "net/url"
"strings"
"sync"
"time"
- "url"
)
// ReverseProxy is an HTTP Handler that takes an incoming request and
package httputil
import (
- "http"
- "http/httptest"
"io/ioutil"
+ "net/http"
+ "net/http/httptest"
+ "net/url"
"testing"
- "url"
)
func TestReverseProxy(t *testing.T) {
"bufio"
"bytes"
"fmt"
- "http"
"io"
+ "net/http"
"os"
"runtime"
"runtime/pprof"
"bytes"
"fmt"
"io"
+ "net/url"
"reflect"
"testing"
- "url"
)
type reqTest struct {
"mime"
"mime/multipart"
"net/textproto"
+ "net/url"
"strconv"
"strings"
- "url"
)
const (
import (
"bytes"
"fmt"
- . "http"
- "http/httptest"
"io"
"io/ioutil"
"mime/multipart"
+ . "net/http"
+ "net/http/httptest"
+ "net/url"
"os"
"reflect"
"regexp"
"strings"
"testing"
- "url"
)
func TestQuery(t *testing.T) {
"fmt"
"io"
"io/ioutil"
+ "net/url"
"strings"
"testing"
- "url"
)
type reqWriteTest struct {
"errors"
"io"
"net/textproto"
+ "net/url"
"strconv"
"strings"
- "url"
)
var respExcludeHeader = map[string]bool{
"fmt"
"io"
"io/ioutil"
+ "net/url"
"reflect"
"testing"
- "url"
)
type respTest struct {
"bytes"
"crypto/tls"
"fmt"
- . "http"
- "http/httptest"
"io"
"io/ioutil"
"log"
"net"
+ . "net/http"
+ "net/http/httptest"
"net/http/httputil"
+ "net/url"
"os"
"reflect"
"strings"
"syscall"
"testing"
"time"
- "url"
)
type dummyAddr string
"io/ioutil"
"log"
"net"
+ "net/url"
"path"
"runtime/debug"
"strconv"
"strings"
"sync"
"time"
- "url"
)
// Errors introduced by the HTTP server.
import (
"bytes"
- . "http"
- "http/httptest"
"io/ioutil"
"log"
+ . "net/http"
+ "net/http/httptest"
"strconv"
"testing"
)
"io/ioutil"
"log"
"net"
+ "net/url"
"os"
"strings"
"sync"
- "url"
)
// DefaultTransport is the default implementation of Transport and is
"compress/gzip"
"crypto/rand"
"fmt"
- . "http"
- "http/httptest"
"io"
"io/ioutil"
+ . "net/http"
+ "net/http/httptest"
+ "net/url"
"strconv"
"strings"
"testing"
"time"
- "url"
)
// TODO: test 5 pipelined requests with responses: 1) OK, 2) OK, Connection: Close
"expvar"
"flag"
"fmt"
- "http"
"io"
"log"
+ "net/http"
"os"
"strconv"
)
import (
"bufio"
+ "encoding/gob"
"errors"
- "gob"
- "http"
"io"
"log"
"net"
+ "net/http"
"sync"
)
import (
"fmt"
- "http"
+ "net/http"
"sort"
- "template"
+ "text/template"
)
const debugText = `<html>
package jsonrpc
import (
+ "encoding/json"
"errors"
"fmt"
"io"
- "json"
"net"
- "rpc"
+ "net/rpc"
"testing"
)
package jsonrpc
import (
+ "encoding/json"
"fmt"
"io"
- "json"
"net"
- "rpc"
+ "net/rpc"
"sync"
)
package jsonrpc
import (
+ "encoding/json"
"errors"
"io"
- "json"
- "rpc"
+ "net/rpc"
"sync"
)
import (
"bufio"
+ "encoding/gob"
"errors"
- "gob"
- "http"
"io"
"log"
"net"
+ "net/http"
"reflect"
"strings"
"sync"
"unicode"
- "utf8"
+ "unicode/utf8"
)
const (
import (
"errors"
"fmt"
- "http/httptest"
"io"
"log"
"net"
+ "net/http/httptest"
"runtime"
"strings"
"sync"
package netchan
import (
+ "encoding/gob"
"errors"
- "gob"
"io"
"reflect"
"sync"
"bytes"
"io"
"strings"
- "utf8"
+ "unicode/utf8"
)
var debug = false
"strconv"
"strings"
"unicode"
- "utf8"
+ "unicode/utf8"
)
// Errors returned during parsing and execution. Users may extract the information and reformat
import (
"bytes"
+ "encoding/json"
"fmt"
"io"
"io/ioutil"
- "json"
"strings"
"testing"
)
import (
"errors"
"syscall"
+ "unicode/utf16"
"unsafe"
- "utf16"
)
// ENOENV is the error indicating that an environment variable does not exist.
"os"
"sort"
"strings"
- "utf8"
+ "unicode/utf8"
)
var ErrBadPattern = errors.New("syntax error in pattern")
import (
"errors"
"strings"
- "utf8"
+ "unicode/utf8"
)
var ErrBadPattern = errors.New("syntax error in pattern")
"compress/bzip2"
"fmt"
"io"
+ "math/rand"
old "old/regexp"
"os"
"path/filepath"
- "rand"
"regexp/syntax"
"strconv"
"strings"
"testing"
- "utf8"
+ "unicode/utf8"
)
// TestRE2 tests this package's regexp API against test cases
"strconv"
"strings"
"sync"
- "utf8"
+ "unicode/utf8"
)
var debug = false
"sort"
"strings"
"unicode"
- "utf8"
+ "unicode/utf8"
)
// An Error describes a failure to parse a regular expression
import (
"math"
- "rand"
+ "math/rand"
. "runtime"
"testing"
)
import (
"fmt"
"math"
- "rand"
+ "math/rand"
. "sort"
"strconv"
"testing"
"bytes"
"strings"
"unicode"
- "utf8"
+ "unicode/utf8"
)
const lowerhex = "0123456789abcdef"
import (
"errors"
"io"
- "utf8"
+ "unicode/utf8"
)
// A Reader implements the io.Reader, io.ByteScanner, and
import (
"unicode"
- "utf8"
+ "unicode/utf8"
)
// explode splits s into an array of UTF-8 sequences, one per Unicode character (still strings) up to a maximum of n (n < 0 means no limit).
. "strings"
"testing"
"unicode"
+ "unicode/utf8"
"unsafe"
- "utf8"
)
func eq(a, b []string) bool {
import (
"sync"
+ "unicode/utf16"
"unsafe"
- "utf16"
)
var ForkLock sync.RWMutex
package syscall
import (
+ "unicode/utf16"
"unsafe"
- "utf16"
)
const OS = "windows"
"flag"
"fmt"
"math"
- "rand"
+ "math/rand"
"reflect"
"strings"
)
package quick
import (
- "rand"
+ "math/rand"
"reflect"
"testing"
)
import (
"fmt"
- "rand"
+ "math/rand"
"reflect"
"strings"
)
"io"
"os"
"unicode"
- "utf8"
+ "unicode/utf8"
)
// TODO(gri): Consider changing this to use the new (token) Position package.
"io"
"strings"
"testing"
- "utf8"
+ "unicode/utf8"
)
// A StringReader delivers its data one string segment at a time via Read.
"bytes"
"io"
"os"
- "utf8"
+ "unicode/utf8"
)
// ----------------------------------------------------------------------------
"reflect"
"runtime"
"strings"
- "template/parse"
+ "text/template/parse"
)
// state represents the state of an execution. It's not part of the
"bytes"
"fmt"
"io"
+ "net/url"
"reflect"
"strings"
"unicode"
- "url"
- "utf8"
+ "unicode/utf8"
)
// FuncMap is the type of the map defining the mapping from names to functions.
import (
"reflect"
- "template/parse"
+ "text/template/parse"
)
// Template is the representation of a parsed template.
"fmt"
"strings"
"unicode"
- "utf8"
+ "unicode/utf8"
)
// item represents a token or text string returned from the scanner.
"fmt"
"io"
"reflect"
- "template/parse"
+ "text/template/parse"
)
// Set holds a set of related templates that can refer to one another by name.
"bufio"
"flag"
"fmt"
- "http"
"io"
"log"
+ "net/http"
"os"
"path/filepath"
"regexp"
"reflect"
"testing"
"unicode"
- . "utf16"
+ . "unicode/utf16"
)
type encodeTest struct {
package utf8_test
import (
- "rand"
+ "math/rand"
"testing"
- . "utf8"
+ . "unicode/utf8"
)
func TestScanForwards(t *testing.T) {
import (
"bytes"
"testing"
- . "utf8"
+ . "unicode/utf8"
)
type Utf8Map struct {
"crypto/tls"
"io"
"net"
- "url"
+ "net/url"
)
// DialError is an error that occurs while dialling a websocket server.
"crypto/md5"
"encoding/binary"
"fmt"
- "http"
"io"
"io/ioutil"
- "rand"
+ "math/rand"
+ "net/http"
+ "net/url"
"strconv"
"strings"
- "url"
)
// An aray of characters to be randomly inserted to construct Sec-WebSocket-Key
"bufio"
"bytes"
"fmt"
- "http"
"io"
+ "net/http"
+ "net/url"
"strings"
"testing"
- "url"
)
// Test the getChallengeResponse function with values from section
"encoding/base64"
"encoding/binary"
"fmt"
- "http"
"io"
"io/ioutil"
+ "net/http"
+ "net/url"
"strings"
- "url"
)
const (
"bufio"
"bytes"
"fmt"
- "http"
"io"
+ "net/http"
+ "net/url"
"strings"
"testing"
- "url"
)
// Test the getNonceAccept function with values in
import (
"bufio"
"fmt"
- "http"
"io"
+ "net/http"
)
func newServerConn(rwc io.ReadWriteCloser, buf *bufio.ReadWriter, req *http.Request) (conn *Conn, err error) {
import (
"bufio"
"crypto/tls"
- "http"
+ "encoding/json"
"io"
"io/ioutil"
- "json"
"net"
+ "net/http"
+ "net/url"
"os"
"sync"
- "url"
)
const (
import (
"bytes"
"fmt"
- "http"
- "http/httptest"
"io"
"log"
"net"
+ "net/http"
+ "net/http/httptest"
+ "net/url"
"strings"
"sync"
"testing"
- "url"
)
var serverAddr string