Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
Motok1 authored and watal committed Jun 5, 2022
1 parent d9a5ffe commit a115a32
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
16 changes: 8 additions & 8 deletions pkg/packet/pcep/pcep.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ func DecodeTLVsFromBytes(data []uint8) ([]Tlv, error) {
tlvs := []Tlv{}
for {
var tlv Tlv
err := tlv.DecodeFromBytes(data)
if err != nil {
return nil, err
}
err := tlv.DecodeFromBytes(data)
if err != nil {
return nil, err
}
tlvs = append(tlvs, tlv)
if int(tlv.getByteLength()) < len(data) {
data = data[tlv.getByteLength():]
Expand Down Expand Up @@ -542,10 +542,10 @@ func (o *LspObject) DecodeFromBytes(data []uint8) error {
byteTlvs := data[4:]
for {
var tlv Tlv
err := tlv.DecodeFromBytes(byteTlvs)
if err != nil {
return err
}
err := tlv.DecodeFromBytes(byteTlvs)
if err != nil {
return err
}

if tlv.Type == uint16(TLV_SYMBOLIC_PATH_NAME) {
o.Name = string(removePadding(tlv.Value))
Expand Down
4 changes: 2 additions & 2 deletions tools/grpc/go/client/add_lsp/test_add_lsp.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import (
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

pb "github.com/nttcom/pola/api/grpc"
)

func main() {
flag.Parse()
conn, err := grpc.Dial("localhost:50051", grpc.WithInsecure())
conn, err := grpc.Dial("localhost:50051", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatalf("Can't connect: %v", err)
}
Expand Down Expand Up @@ -95,7 +96,6 @@ func main() {
Sid: uint32(sid),
LoAddr: []byte(localAddr.To4()),
}
fmt.Printf("%#v\n", label)

labels = append(labels, &label)
}
Expand Down
3 changes: 2 additions & 1 deletion tools/grpc/go/client/show_lsp_list/test_show_lsp_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ import (
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

empty "github.com/golang/protobuf/ptypes/empty"
pb "github.com/nttcom/pola/api/grpc"
)

func main() {
flag.Parse()
conn, err := grpc.Dial("localhost:50051", grpc.WithInsecure())
conn, err := grpc.Dial("localhost:50051", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatalf("did not connect: %v", err)
}
Expand Down
3 changes: 2 additions & 1 deletion tools/grpc/go/client/show_session/test_show_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ import (
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

empty "github.com/golang/protobuf/ptypes/empty"
pb "github.com/nttcom/pola/api/grpc"
)

func main() {
flag.Parse()
conn, err := grpc.Dial("localhost:50051", grpc.WithInsecure())
conn, err := grpc.Dial("localhost:50051", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatalf("did not connect: %v", err)
}
Expand Down

0 comments on commit a115a32

Please sign in to comment.