Skip to content

Commit

Permalink
fix ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
0pcom committed Apr 3, 2024
1 parent 94a6e0b commit ca83cc4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/transport-setup/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ var addTPCmd = &cobra.Command{
Run: func(_ *cobra.Command, args []string) {
err := pk1.Set(fromPK)
if err != nil {
log.Fatal("-1 invalid public key: ", err)
log.Fatalf("-1 invalid public key: %v\n", err)
}
err = pk2.Set(toPK)
if err != nil {
log.Fatal("-2 invalid public key: ", err)
log.Fatalf("-2 invalid public key: %v\n", err)
}
if tpType != "dmsg" && tpType != "stcpr" && tpType != "sudph" {
log.Fatal("invalid transport type specified: ", tpType)
Expand All @@ -141,11 +141,11 @@ var addTPCmd = &cobra.Command{
}
addtpJSON, err := json.Marshal(addtp)
if err != nil {
log.Fatalf("Error: ", err)
log.Fatalf("Error occurred: %v\n", err)
}
res, err := script.Echo(string(addtpJSON)).Post(tpsnAddr + "/add").String()
if err != nil {
log.Fatalf("error: ", err)
log.Fatalf("Error occurred: %v\n", err)
}
if nice {
fmt.Printf("%v", string(pretty.Color(pretty.Pretty([]byte(res)), nil)))
Expand All @@ -166,23 +166,23 @@ var rmTPCmd = &cobra.Command{
Run: func(_ *cobra.Command, args []string) {
err := pk1.Set(fromPK)
if err != nil {
log.Fatal("invalid public key: ", err)
log.Fatalf("invalid public key: %v\n", err)
}
tpid, err := uuid.Parse(tpID)
if err != nil {
log.Fatal("invalid tp id: ", err)
log.Fatalf("invalid tp id: %v\n", err)
}
rmtp := api.UUIDRequest{
From: pk1,
ID: tpid,
}
rmtpJSON, err := json.Marshal(rmtp)
if err != nil {
log.Fatalf("Error: ", err)
log.Fatalf("Error occurred: %v\n", err)
}
res, err := script.Echo(string(rmtpJSON)).Post(tpsnAddr + "/remove").String()
if err != nil {
log.Fatalf("error: ", err)
log.Fatalf("Error occurred: %v\n", err)
}
if nice {
fmt.Printf("%v", string(pretty.Color(pretty.Pretty([]byte(res)), nil)))
Expand Down

0 comments on commit ca83cc4

Please sign in to comment.