Skip to content

Commit 5b147d7

Browse files
lint fixing in RPC example
1 parent 5c3b229 commit 5b147d7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

example/RpcClientServer/RpcClientServer.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,37 @@ package main
33
import (
44
"errors"
55
"fmt"
6-
"github.com/DistributedClocks/GoVector/govec"
7-
"github.com/DistributedClocks/GoVector/govec/vrpc"
86
"log"
97
"net"
108
"net/rpc"
119
"time"
10+
11+
"github.com/DistributedClocks/GoVector/govec"
12+
"github.com/DistributedClocks/GoVector/govec/vrpc"
1213
)
1314

1415
var done chan int = make(chan int, 1)
1516

17+
//Args are matematical arguments for the rpc operations
1618
type Args struct {
1719
A, B int
1820
}
1921

22+
//Quotient is the result of a Divide RPC
2023
type Quotient struct {
2124
Quo, Rem int
2225
}
2326

27+
//Arith is an RPC math server type
2428
type Arith int
2529

30+
//Multiply performs multiplication on two integers
2631
func (t *Arith) Multiply(args *Args, reply *int) error {
2732
*reply = args.A * args.B
2833
return nil
2934
}
3035

36+
//Divide divides a by b and returns a quotient with a remainder
3137
func (t *Arith) Divide(args *Args, quo *Quotient) error {
3238
if args.B == 0 {
3339
return errors.New("divide by zero")

0 commit comments

Comments
 (0)