Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
f6d0aded
Commit
f6d0aded
authored
Mar 22, 2013
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: remove dead code
R=golang-dev, r CC=golang-dev
https://golang.org/cl/7877045
parent
f29b0911
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
3 additions
and
38 deletions
+3
-38
src/cmd/go/discovery.go
src/cmd/go/discovery.go
+0
-1
src/cmd/yacc/yacc.go
src/cmd/yacc/yacc.go
+0
-1
src/pkg/compress/flate/inflate.go
src/pkg/compress/flate/inflate.go
+0
-1
src/pkg/compress/gzip/gunzip.go
src/pkg/compress/gzip/gunzip.go
+0
-1
src/pkg/compress/lzw/reader.go
src/pkg/compress/lzw/reader.go
+0
-1
src/pkg/crypto/dsa/dsa_test.go
src/pkg/crypto/dsa/dsa_test.go
+3
-2
src/pkg/crypto/rand/util.go
src/pkg/crypto/rand/util.go
+0
-4
src/pkg/encoding/asn1/marshal.go
src/pkg/encoding/asn1/marshal.go
+0
-1
src/pkg/encoding/csv/reader.go
src/pkg/encoding/csv/reader.go
+0
-2
src/pkg/encoding/gob/decode.go
src/pkg/encoding/gob/decode.go
+0
-1
src/pkg/encoding/gob/type.go
src/pkg/encoding/gob/type.go
+0
-1
src/pkg/encoding/json/decode.go
src/pkg/encoding/json/decode.go
+0
-1
src/pkg/html/template/transition.go
src/pkg/html/template/transition.go
+0
-2
src/pkg/math/big/nat.go
src/pkg/math/big/nat.go
+0
-2
src/pkg/net/http/httputil/reverseproxy.go
src/pkg/net/http/httputil/reverseproxy.go
+0
-1
src/pkg/net/ip.go
src/pkg/net/ip.go
+0
-1
src/pkg/net/unixsock_posix.go
src/pkg/net/unixsock_posix.go
+0
-1
src/pkg/os/file_posix.go
src/pkg/os/file_posix.go
+0
-2
src/pkg/os/getwd.go
src/pkg/os/getwd.go
+0
-2
src/pkg/reflect/tostring_test.go
src/pkg/reflect/tostring_test.go
+0
-1
src/pkg/strconv/extfloat.go
src/pkg/strconv/extfloat.go
+0
-1
src/pkg/syscall/exec_bsd.go
src/pkg/syscall/exec_bsd.go
+0
-5
src/pkg/testing/quick/quick.go
src/pkg/testing/quick/quick.go
+0
-2
src/pkg/text/template/parse/parse.go
src/pkg/text/template/parse/parse.go
+0
-1
No files found.
src/cmd/go/discovery.go
View file @
f6d0aded
...
@@ -48,7 +48,6 @@ func parseMetaGoImports(r io.Reader) (imports []metaImport) {
...
@@ -48,7 +48,6 @@ func parseMetaGoImports(r io.Reader) (imports []metaImport) {
})
})
}
}
}
}
return
}
}
// attrValue returns the attribute value for the case-insensitive key
// attrValue returns the attribute value for the case-insensitive key
...
...
src/cmd/yacc/yacc.go
View file @
f6d0aded
...
@@ -3164,7 +3164,6 @@ func ungetrune(f *bufio.Reader, c rune) {
...
@@ -3164,7 +3164,6 @@ func ungetrune(f *bufio.Reader, c rune) {
func
write
(
f
*
bufio
.
Writer
,
b
[]
byte
,
n
int
)
int
{
func
write
(
f
*
bufio
.
Writer
,
b
[]
byte
,
n
int
)
int
{
panic
(
"write"
)
panic
(
"write"
)
return
0
}
}
func
open
(
s
string
)
*
bufio
.
Reader
{
func
open
(
s
string
)
*
bufio
.
Reader
{
...
...
src/pkg/compress/flate/inflate.go
View file @
f6d0aded
...
@@ -640,7 +640,6 @@ func (f *decompressor) huffSym(h *huffmanDecoder) (int, error) {
...
@@ -640,7 +640,6 @@ func (f *decompressor) huffSym(h *huffmanDecoder) (int, error) {
return
int
(
chunk
>>
huffmanValueShift
),
nil
return
int
(
chunk
>>
huffmanValueShift
),
nil
}
}
}
}
return
0
,
CorruptInputError
(
f
.
roffset
)
}
}
// Flush any buffered output to the underlying writer.
// Flush any buffered output to the underlying writer.
...
...
src/pkg/compress/gzip/gunzip.go
View file @
f6d0aded
...
@@ -120,7 +120,6 @@ func (z *Reader) readString() (string, error) {
...
@@ -120,7 +120,6 @@ func (z *Reader) readString() (string, error) {
return
string
(
z
.
buf
[
0
:
i
]),
nil
return
string
(
z
.
buf
[
0
:
i
]),
nil
}
}
}
}
panic
(
"not reached"
)
}
}
func
(
z
*
Reader
)
read2
()
(
uint32
,
error
)
{
func
(
z
*
Reader
)
read2
()
(
uint32
,
error
)
{
...
...
src/pkg/compress/lzw/reader.go
View file @
f6d0aded
...
@@ -202,7 +202,6 @@ func (d *decoder) decode() {
...
@@ -202,7 +202,6 @@ func (d *decoder) decode() {
return
return
}
}
}
}
panic
(
"unreachable"
)
}
}
func
(
d
*
decoder
)
flush
()
{
func
(
d
*
decoder
)
flush
()
{
...
...
src/pkg/crypto/dsa/dsa_test.go
View file @
f6d0aded
...
@@ -63,8 +63,9 @@ func testParameterGeneration(t *testing.T, sizes ParameterSizes, L, N int) {
...
@@ -63,8 +63,9 @@ func testParameterGeneration(t *testing.T, sizes ParameterSizes, L, N int) {
}
}
func
TestParameterGeneration
(
t
*
testing
.
T
)
{
func
TestParameterGeneration
(
t
*
testing
.
T
)
{
// This test is too slow to run all the time.
if
testing
.
Short
()
{
return
t
.
Skip
(
"skipping parameter generation test in short mode"
)
}
testParameterGeneration
(
t
,
L1024N160
,
1024
,
160
)
testParameterGeneration
(
t
,
L1024N160
,
1024
,
160
)
testParameterGeneration
(
t
,
L2048N224
,
2048
,
224
)
testParameterGeneration
(
t
,
L2048N224
,
2048
,
224
)
...
...
src/pkg/crypto/rand/util.go
View file @
f6d0aded
...
@@ -98,8 +98,6 @@ func Prime(rand io.Reader, bits int) (p *big.Int, err error) {
...
@@ -98,8 +98,6 @@ func Prime(rand io.Reader, bits int) (p *big.Int, err error) {
return
return
}
}
}
}
return
}
}
// Int returns a uniform random value in [0, max).
// Int returns a uniform random value in [0, max).
...
@@ -130,6 +128,4 @@ func Int(rand io.Reader, max *big.Int) (n *big.Int, err error) {
...
@@ -130,6 +128,4 @@ func Int(rand io.Reader, max *big.Int) (n *big.Int, err error) {
return
return
}
}
}
}
return
}
}
src/pkg/encoding/asn1/marshal.go
View file @
f6d0aded
...
@@ -460,7 +460,6 @@ func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameter
...
@@ -460,7 +460,6 @@ func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameter
default
:
default
:
return
marshalUTF8String
(
out
,
v
.
String
())
return
marshalUTF8String
(
out
,
v
.
String
())
}
}
return
}
}
return
StructuralError
{
"unknown Go type"
}
return
StructuralError
{
"unknown Go type"
}
...
...
src/pkg/encoding/csv/reader.go
View file @
f6d0aded
...
@@ -212,7 +212,6 @@ func (r *Reader) skip(delim rune) error {
...
@@ -212,7 +212,6 @@ func (r *Reader) skip(delim rune) error {
return
nil
return
nil
}
}
}
}
panic
(
"unreachable"
)
}
}
// parseRecord reads and parses a single csv record from r.
// parseRecord reads and parses a single csv record from r.
...
@@ -249,7 +248,6 @@ func (r *Reader) parseRecord() (fields []string, err error) {
...
@@ -249,7 +248,6 @@ func (r *Reader) parseRecord() (fields []string, err error) {
return
nil
,
err
return
nil
,
err
}
}
}
}
panic
(
"unreachable"
)
}
}
// parseField parses the next field in the record. The read field is
// parseField parses the next field in the record. The read field is
...
...
src/pkg/encoding/gob/decode.go
View file @
f6d0aded
...
@@ -1066,7 +1066,6 @@ func (dec *Decoder) compatibleType(fr reflect.Type, fw typeId, inProgress map[re
...
@@ -1066,7 +1066,6 @@ func (dec *Decoder) compatibleType(fr reflect.Type, fw typeId, inProgress map[re
case
reflect
.
Struct
:
case
reflect
.
Struct
:
return
true
return
true
}
}
return
true
}
}
// typeString returns a human-readable description of the type identified by remoteId.
// typeString returns a human-readable description of the type identified by remoteId.
...
...
src/pkg/encoding/gob/type.go
View file @
f6d0aded
...
@@ -526,7 +526,6 @@ func newTypeObject(name string, ut *userTypeInfo, rt reflect.Type) (gobType, err
...
@@ -526,7 +526,6 @@ func newTypeObject(name string, ut *userTypeInfo, rt reflect.Type) (gobType, err
default
:
default
:
return
nil
,
errors
.
New
(
"gob NewTypeObject can't handle type: "
+
rt
.
String
())
return
nil
,
errors
.
New
(
"gob NewTypeObject can't handle type: "
+
rt
.
String
())
}
}
return
nil
,
nil
}
}
// isExported reports whether this is an exported - upper case - name.
// isExported reports whether this is an exported - upper case - name.
...
...
src/pkg/encoding/json/decode.go
View file @
f6d0aded
...
@@ -868,7 +868,6 @@ func (d *decodeState) literalInterface() interface{} {
...
@@ -868,7 +868,6 @@ func (d *decodeState) literalInterface() interface{} {
}
}
return
n
return
n
}
}
panic
(
"unreachable"
)
}
}
// getu4 decodes \uXXXX from the beginning of s, returning the hex value,
// getu4 decodes \uXXXX from the beginning of s, returning the hex value,
...
...
src/pkg/html/template/transition.go
View file @
f6d0aded
...
@@ -429,7 +429,6 @@ func tCSS(c context, s []byte) (context, int) {
...
@@ -429,7 +429,6 @@ func tCSS(c context, s []byte) (context, int) {
}
}
k
=
i
+
1
k
=
i
+
1
}
}
panic
(
"unreachable"
)
}
}
// tCSSStr is the context transition function for the CSS string and URL states.
// tCSSStr is the context transition function for the CSS string and URL states.
...
@@ -470,7 +469,6 @@ func tCSSStr(c context, s []byte) (context, int) {
...
@@ -470,7 +469,6 @@ func tCSSStr(c context, s []byte) (context, int) {
c
,
_
=
tURL
(
c
,
decodeCSS
(
s
[
:
i
+
1
]))
c
,
_
=
tURL
(
c
,
decodeCSS
(
s
[
:
i
+
1
]))
k
=
i
+
1
k
=
i
+
1
}
}
panic
(
"unreachable"
)
}
}
// tError is the context transition function for the error state.
// tError is the context transition function for the error state.
...
...
src/pkg/math/big/nat.go
View file @
f6d0aded
...
@@ -1021,8 +1021,6 @@ func trailingZeroBits(x Word) uint {
...
@@ -1021,8 +1021,6 @@ func trailingZeroBits(x Word) uint {
default
:
default
:
panic
(
"unknown word size"
)
panic
(
"unknown word size"
)
}
}
return
0
}
}
// trailingZeroBits returns the number of consecutive least significant zero
// trailingZeroBits returns the number of consecutive least significant zero
...
...
src/pkg/net/http/httputil/reverseproxy.go
View file @
f6d0aded
...
@@ -202,7 +202,6 @@ func (m *maxLatencyWriter) flushLoop() {
...
@@ -202,7 +202,6 @@ func (m *maxLatencyWriter) flushLoop() {
m
.
lk
.
Unlock
()
m
.
lk
.
Unlock
()
}
}
}
}
panic
(
"unreached"
)
}
}
func
(
m
*
maxLatencyWriter
)
stop
()
{
m
.
done
<-
true
}
func
(
m
*
maxLatencyWriter
)
stop
()
{
m
.
done
<-
true
}
src/pkg/net/ip.go
View file @
f6d0aded
...
@@ -222,7 +222,6 @@ func (ip IP) DefaultMask() IPMask {
...
@@ -222,7 +222,6 @@ func (ip IP) DefaultMask() IPMask {
default
:
default
:
return
classCMask
return
classCMask
}
}
return
nil
// not reached
}
}
func
allFF
(
b
[]
byte
)
bool
{
func
allFF
(
b
[]
byte
)
bool
{
...
...
src/pkg/net/unixsock_posix.go
View file @
f6d0aded
...
@@ -99,7 +99,6 @@ func sotypeToNet(sotype int) string {
...
@@ -99,7 +99,6 @@ func sotypeToNet(sotype int) string {
default
:
default
:
panic
(
"sotypeToNet unknown socket type"
)
panic
(
"sotypeToNet unknown socket type"
)
}
}
return
""
}
}
// UnixConn is an implementation of the Conn interface for connections
// UnixConn is an implementation of the Conn interface for connections
...
...
src/pkg/os/file_posix.go
View file @
f6d0aded
...
@@ -46,8 +46,6 @@ func Readlink(name string) (string, error) {
...
@@ -46,8 +46,6 @@ func Readlink(name string) (string, error) {
return
string
(
b
[
0
:
n
]),
nil
return
string
(
b
[
0
:
n
]),
nil
}
}
}
}
// Silence 6g.
return
""
,
nil
}
}
// Rename renames a file.
// Rename renames a file.
...
...
src/pkg/os/getwd.go
View file @
f6d0aded
...
@@ -90,8 +90,6 @@ func Getwd() (pwd string, err error) {
...
@@ -90,8 +90,6 @@ func Getwd() (pwd string, err error) {
}
}
}
}
}
}
fd
.
Close
()
return
""
,
ErrNotExist
Found
:
Found
:
pd
,
err
:=
fd
.
Stat
()
pd
,
err
:=
fd
.
Stat
()
...
...
src/pkg/reflect/tostring_test.go
View file @
f6d0aded
...
@@ -92,5 +92,4 @@ func valueToString(val Value) string {
...
@@ -92,5 +92,4 @@ func valueToString(val Value) string {
default
:
default
:
panic
(
"valueToString: can't print type "
+
typ
.
String
())
panic
(
"valueToString: can't print type "
+
typ
.
String
())
}
}
return
"valueToString: can't happen"
}
}
src/pkg/strconv/extfloat.go
View file @
f6d0aded
...
@@ -636,7 +636,6 @@ func (f *extFloat) ShortestDecimal(d *decimalSlice, lower, upper *extFloat) bool
...
@@ -636,7 +636,6 @@ func (f *extFloat) ShortestDecimal(d *decimalSlice, lower, upper *extFloat) bool
1
<<
shift
,
multiplier
*
2
)
1
<<
shift
,
multiplier
*
2
)
}
}
}
}
return
false
}
}
// adjustLastDigit modifies d = x-currentDiff*ε, to get closest to
// adjustLastDigit modifies d = x-currentDiff*ε, to get closest to
...
...
src/pkg/syscall/exec_bsd.go
View file @
f6d0aded
...
@@ -215,11 +215,6 @@ childerror:
...
@@ -215,11 +215,6 @@ childerror:
for
{
for
{
RawSyscall
(
SYS_EXIT
,
253
,
0
,
0
)
RawSyscall
(
SYS_EXIT
,
253
,
0
,
0
)
}
}
// Calling panic is not actually safe,
// but the for loop above won't break
// and this shuts up the compiler.
panic
(
"unreached"
)
}
}
// Try to open a pipe with O_CLOEXEC set on both file descriptors.
// Try to open a pipe with O_CLOEXEC set on both file descriptors.
...
...
src/pkg/testing/quick/quick.go
View file @
f6d0aded
...
@@ -140,8 +140,6 @@ func Value(t reflect.Type, rand *rand.Rand) (value reflect.Value, ok bool) {
...
@@ -140,8 +140,6 @@ func Value(t reflect.Type, rand *rand.Rand) (value reflect.Value, ok bool) {
default
:
default
:
return
reflect
.
Value
{},
false
return
reflect
.
Value
{},
false
}
}
return
}
}
// A Config structure contains options for running a test.
// A Config structure contains options for running a test.
...
...
src/pkg/text/template/parse/parse.go
View file @
f6d0aded
...
@@ -429,7 +429,6 @@ func (t *Tree) pipeline(context string) (pipe *PipeNode) {
...
@@ -429,7 +429,6 @@ func (t *Tree) pipeline(context string) (pipe *PipeNode) {
t
.
unexpected
(
token
,
context
)
t
.
unexpected
(
token
,
context
)
}
}
}
}
return
}
}
func
(
t
*
Tree
)
parseControl
(
context
string
)
(
pos
Pos
,
line
int
,
pipe
*
PipeNode
,
list
,
elseList
*
ListNode
)
{
func
(
t
*
Tree
)
parseControl
(
context
string
)
(
pos
Pos
,
line
int
,
pipe
*
PipeNode
,
list
,
elseList
*
ListNode
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment