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
7e92eedc
Commit
7e92eedc
authored
Nov 05, 2009
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gofmt'ed various stragglers
R=rsc
http://go/go-review/1022002
parent
183edddb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
288 additions
and
288 deletions
+288
-288
src/pkg/patch/patch_test.go
src/pkg/patch/patch_test.go
+268
-268
src/pkg/path/path.go
src/pkg/path/path.go
+2
-2
src/pkg/rpc/client.go
src/pkg/rpc/client.go
+18
-18
No files found.
src/pkg/patch/patch_test.go
View file @
7e92eedc
src/pkg/path/path.go
View file @
7e92eedc
src/pkg/rpc/client.go
View file @
7e92eedc
...
...
@@ -36,7 +36,7 @@ type Client struct {
conn
io
.
ReadWriteCloser
;
enc
*
gob
.
Encoder
;
dec
*
gob
.
Decoder
;
pending
map
[
uint64
]
*
Call
;
pending
map
[
uint64
]
*
Call
;
}
func
(
client
*
Client
)
send
(
c
*
Call
)
{
...
...
@@ -75,7 +75,7 @@ func (client *Client) input() {
if
err
==
os
.
EOF
{
err
=
io
.
ErrUnexpectedEOF
;
}
break
break
;
}
seq
:=
response
.
Seq
;
client
.
mutex
.
Lock
();
...
...
@@ -106,7 +106,7 @@ func NewClient(conn io.ReadWriteCloser) *Client {
client
.
conn
=
conn
;
client
.
enc
=
gob
.
NewEncoder
(
conn
);
client
.
dec
=
gob
.
NewDecoder
(
conn
);
client
.
pending
=
make
(
map
[
uint64
]
*
Call
);
client
.
pending
=
make
(
map
[
uint64
]
*
Call
);
go
client
.
input
();
return
client
;
}
...
...
@@ -115,7 +115,7 @@ func NewClient(conn io.ReadWriteCloser) *Client {
func
DialHTTP
(
network
,
address
string
)
(
*
Client
,
os
.
Error
)
{
conn
,
err
:=
net
.
Dial
(
network
,
""
,
address
);
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
;
}
io
.
WriteString
(
conn
,
"CONNECT "
+
rpcPath
+
" HTTP/1.0
\n\n
"
);
...
...
@@ -136,7 +136,7 @@ func DialHTTP(network, address string) (*Client, os.Error) {
func
Dial
(
network
,
address
string
)
(
*
Client
,
os
.
Error
)
{
conn
,
err
:=
net
.
Dial
(
network
,
""
,
address
);
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
;
}
return
NewClient
(
conn
),
nil
;
}
...
...
@@ -170,7 +170,7 @@ func (client *Client) Go(serviceMethod string, args interface{}, reply interface
// Call invokes the named function, waits for it to complete, and returns its error status.
func
(
client
*
Client
)
Call
(
serviceMethod
string
,
args
interface
{},
reply
interface
{})
os
.
Error
{
if
client
.
shutdown
!=
nil
{
return
client
.
shutdown
return
client
.
shutdown
;
}
call
:=
<-
client
.
Go
(
serviceMethod
,
args
,
reply
,
nil
)
.
Done
;
return
call
.
Error
;
...
...
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