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
d3d3accd
Commit
d3d3accd
authored
Nov 05, 2009
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt-ify io, json, runtime, encoding
R=rsc
http://go/go-review/1017056
parent
441e775d
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
112 additions
and
104 deletions
+112
-104
src/pkg/encoding/ascii85/ascii85_test.go
src/pkg/encoding/ascii85/ascii85_test.go
+7
-7
src/pkg/encoding/git85/git_test.go
src/pkg/encoding/git85/git_test.go
+8
-8
src/pkg/io/pipe_test.go
src/pkg/io/pipe_test.go
+6
-6
src/pkg/io/utils.go
src/pkg/io/utils.go
+9
-3
src/pkg/io/utils_test.go
src/pkg/io/utils_test.go
+4
-4
src/pkg/json/struct.go
src/pkg/json/struct.go
+5
-4
src/pkg/json/struct_test.go
src/pkg/json/struct_test.go
+23
-23
src/pkg/runtime/extern.go
src/pkg/runtime/extern.go
+1
-1
src/pkg/runtime/type.go
src/pkg/runtime/type.go
+49
-48
No files found.
src/pkg/encoding/ascii85/ascii85_test.go
View file @
d3d3accd
src/pkg/encoding/git85/git_test.go
View file @
d3d3accd
src/pkg/io/pipe_test.go
View file @
d3d3accd
src/pkg/io/utils.go
View file @
d3d3accd
...
...
@@ -48,9 +48,15 @@ func WriteFile(filename string, data []byte, perm int) os.Error {
// A dirList implements sort.Interface.
type
dirList
[]
*
os
.
Dir
func
(
d
dirList
)
Len
()
int
{
return
len
(
d
);
}
func
(
d
dirList
)
Less
(
i
,
j
int
)
bool
{
return
d
[
i
]
.
Name
<
d
[
j
]
.
Name
;
}
func
(
d
dirList
)
Swap
(
i
,
j
int
)
{
d
[
i
],
d
[
j
]
=
d
[
j
],
d
[
i
];
}
func
(
d
dirList
)
Len
()
int
{
return
len
(
d
);
}
func
(
d
dirList
)
Less
(
i
,
j
int
)
bool
{
return
d
[
i
]
.
Name
<
d
[
j
]
.
Name
;
}
func
(
d
dirList
)
Swap
(
i
,
j
int
)
{
d
[
i
],
d
[
j
]
=
d
[
j
],
d
[
i
];
}
// ReadDir reads the directory named by dirname and returns
// a list of sorted directory entries.
...
...
src/pkg/io/utils_test.go
View file @
d3d3accd
src/pkg/json/struct.go
View file @
d3d3accd
...
...
@@ -113,7 +113,8 @@ func (b *structBuilder) Float64(f float64) {
}
}
func
(
b
*
structBuilder
)
Null
()
{}
func
(
b
*
structBuilder
)
Null
()
{
}
func
(
b
*
structBuilder
)
String
(
s
string
)
{
if
b
==
nil
{
...
...
src/pkg/json/struct_test.go
View file @
d3d3accd
...
...
@@ -43,9 +43,9 @@ const encoded = `{"t":true,"f":false,"s":"abc","i8":1,"i16":2,"i32":3,"i64":4,`
`"mapptrstruct":{"m1":{"u8":8}}}`
var
decodedMap
=
map
[
string
][]
int
{
"k1"
:
[]
int
{
1
,
2
,
3
},
"k1"
:
[]
int
{
1
,
2
,
3
},
"k2"
:
[]
int
{},
"k3"
:
[]
int
{
3
,
4
},
"k3"
:
[]
int
{
3
,
4
},
}
var
decodedMapStruct
=
map
[
string
]
myStruct
{
...
...
src/pkg/runtime/extern.go
View file @
d3d3accd
...
...
@@ -5,7 +5,7 @@
/*
The runtime package contains operations that interact with Go's runtime system,
such as functions to control goroutines.
*/
*/
package
runtime
// These functions are implemented in the base runtime library, ../../runtime/.
...
...
src/pkg/runtime/type.go
View file @
d3d3accd
...
...
@@ -21,7 +21,7 @@ import "unsafe"
// compile time; non-empty interface values get created
// during initialization. Type is an empty interface
// so that the compiler can lay out references as data.
type
Type
interface
{
}
type
Type
interface
{
}
// All types begin with a few common fields needed for
// the interface runtime.
...
...
@@ -125,10 +125,11 @@ type SliceType struct {
// ChanDir represents a channel type's direction.
type
ChanDir
int
const
(
RecvDir
ChanDir
=
1
<<
iota
;
// <-chan
SendDir
;
// chan<-
BothDir
=
RecvDir
|
SendDir
;
// chan
BothDir
=
RecvDir
|
SendDir
;
// chan
)
// ChanType represents a channel type.
...
...
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