1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
.\" Hey, EMACS: -*- nroff -*-
.TH GO-CLEAN 1 "2012-05-13"
.\" Please adjust this date whenever revising the manpage.
.SH NAME
go \- tool for managing Go source code
.SH SYNOPSIS
.B go clean
.RB [\|\-i\|]
.RB [\|\-r\|]
.RB [\|\-n\|]
.RB [\|\-x\|]
.RB [
.IR packages
.RB ]
.SH DESCRIPTION
Clean removes object files from package source directories.
The go command builds most objects in a temporary directory,
so go clean is mainly concerned with object files left by other
tools or by manual invocations of go build.
Specifically, clean removes the following files from each of the
source directories corresponding to the import paths:
.TP
.B _obj/
old object directory, left from Makefiles
.TP
.B _test/
old test directory, left from Makefiles
.TP
.B _testmain.go
old gotest file, left from Makefiles
.TP
.B test.out
old test log, left from Makefiles
.TP
.B build.out
old test log, left from Makefiles
.TP
.B *.[568ao]
object files, left from Makefiles
.TP
.B DIR(.exe)
from go build
.TP
.B DIR.test(.exe)
from go test \-c
.TP
.B MAINFILE(.exe)
from go build MAINFILE.go
.P
In the list, DIR represents the final path element of the
directory, and MAINFILE is the base name of any Go source
file in the directory that is not included when building
the package.
.SH OPTIONS
.TP
.B \-i
The \-i flag causes clean to remove the corresponding installed
archive or binary (what 'go install' would create).
.TP
.B \-n
The \-n flag causes clean to print the remove commands it would execute,
but not run them.
.TP
.B \-r
The \-r flag causes clean to be applied recursively to all the
dependencies of the packages named by the import paths.
.TP
.B \-x
The \-x flag causes clean to print remove commands as it executes them.
.P
For more about specifying packages, see \fBgo-packages\fP(7).
.SH AUTHOR
.PP
This manual page was written by Michael Stapelberg <stapelberg@debian.org>,
for the Debian project (and may be used by others).
|