an atomdrift project
Hostile 100% go Download

golang.org/x/tools v0.0.0-20200427205912-352a5409fae0

ActiveXObject name referenceBacktick shell command-substitution syntax

Evidence

Git clone command README.md · lines 1–27
1# Go Tools
2
3This subrepository holds the source for various packages and tools that support
4the Go programming language.
5
6Some of the tools, `godoc` and `vet` for example, are included in binary Go
7distributions.
8
9Others, including the Go `guru` and the test coverage tool, can be fetched with
10`go get`.
11
⋯4 lines
16
17The easiest way to install is to run `go get -u golang.org/x/tools/...`. You can
18also manually git clone the repository to `$GOPATH/src/golang.org/x/tools`.
19
20## Report Issues / Send Patches
21
22This repository uses Gerrit for code changes. To learn how to submit changes to
23this repository, see https://golang.org/doc/contribute.html.
24
25The main issue tracker for the tools repository is located at
26https://github.com/golang/go/issues. Prefix your issue with "x/tools/(your
27subdir):" in the subject line, so it is easy to find.
Go strconv.Atoi call parse.go · lines 40–57
40:9… t.
41func ParseLine(line string) (*Benchmark, error) {
42 fields := strings.Fields(line)
43
44 // Two required, positional fields: Name and iterations.
45 if len(fields) < 2 {
46 return nil, fmt.Errorf("two fields required, have %d", len(fields))
47 }
48 if !strings.HasPrefix(fields[0], "Benchmark") {
49 return nil, fmt.Errorf(`first field does not start with "Benchmark"`)
50 }
51 n, err := strconv.Atoi(fields[1])
52 if err != nil {
53 return nil, err
⋯4 lines
imports reflect parse_test.go · lines 1–19
1// Copyright 2014 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package parse
6
7import (
8 "reflect"
9 "strings"
10 "testing"
11)
12
13func TestParseLine(t *testing.T) {
14 cases := []struct {
15 line string
⋯4 lines
Calls Go t.Error or t.Errorf parse_test.go · lines 74–88
⋯5 lines
79 }
80
81 for _, tt := range cases {
82 have, err := ParseLine(tt.line)
83 if tt.err && err == nil {
84 t.Errorf("parsing line %q should have failed", tt.line)
85 continue
86 }
87 if !reflect.DeepEqual(have, tt.want) {
88 t.Errorf("parsed lin …
Calls Go t.Fatal or t.Fatalf parse_test.go · lines 147–152
147:2… have, err := ParseSet(strings.NewReader(in))
148 if err != nil {
149 t.Fatalf("unexpected err during ParseSet: %v", err)
150 }
151 if !reflect.DeepEqual(want, have) {
152 t.Errorf("parsed bench set incorrectly, wa …

Showing the top 5 files — 7 more files (57 regions) not shown.

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.