~ubuntu-branches/ubuntu/utopic/golang/utopic

« back to all changes in this revision

Viewing changes to src/cmd/vet/doc.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
that do not guarantee all reports are genuine problems, but it can find errors
10
10
not caught by the compilers.
11
11
 
 
12
Its exit code is 2 for erroneous invocation of the tool, 1 if a
 
13
problem was reported, and 0 otherwise. Note that the tool does not
 
14
check every possible problem and depends on unreliable heuristics
 
15
so it should be used as guidance only, not as a firm indicator of
 
16
program correctness.
 
17
 
 
18
By default all checks are performed, but if explicit flags are provided, only
 
19
those identified by the flags are performed.
 
20
 
12
21
Available checks:
13
22
 
14
 
1. Printf family
 
23
1. Printf family, flag -printf
15
24
 
16
25
Suspicious calls to functions in the Printf family, including any functions
17
26
with these names:
28
37
It also checks for errors such as using a Writer as the first argument of
29
38
Printf.
30
39
 
31
 
2. Methods
 
40
2. Methods, flag -methods
32
41
 
33
42
Non-standard signatures for methods with familiar names, including:
34
43
        Format GobEncode GobDecode MarshalJSON MarshalXML
35
 
        Peek ReadByte ReadFrom ReadRune Scan Seek 
 
44
        Peek ReadByte ReadFrom ReadRune Scan Seek
36
45
        UnmarshalJSON UnreadByte UnreadRune WriteByte
37
46
        WriteTo
38
47
 
39
 
3. Struct tags
 
48
3. Struct tags, flag -structtags
40
49
 
41
50
Struct tags that do not follow the format understood by reflect.StructTag.Get.
42
51
 
 
52
4. Untagged composite literals, flag -composites
 
53
 
 
54
Composite struct literals that do not use the type-tagged syntax.
 
55
 
 
56
 
43
57
Usage:
44
58
 
45
59
        go tool vet [flag] [file.go ...]
46
60
        go tool vet [flag] [directory ...] # Scan all .go files under directory, recursively
47
61
 
48
 
The flags are:
 
62
The other flags are:
49
63
        -v
50
64
                Verbose mode
51
65
        -printfuncs
59
73
                        -printfuncs=Warn:1,Warnf:1
60
74
 
61
75
*/
62
 
package documentation
 
76
package main