jpictl: fix cloud.yaml unmarshalling #32

Merged
amery merged 2 commits from pr-amery-unmarshaltext into main 2023-10-30 20:43:22 +01:00
Owner

fix cloud.yaml unmarshalling by implementing UnmarshalText on wireguard endpoint addresses and keys

fix cloud.yaml unmarshalling by implementing UnmarshalText on wireguard endpoint addresses and keys
amery added 2 commits 2023-10-28 17:57:34 +02:00
amery requested review from karasz 2023-10-28 17:57:39 +02:00
karasz approved these changes 2023-10-30 14:48:35 +01:00
karasz left a comment
Owner

Looks a bit strange to me to have switch statement with only 2 cases from which one is default, but otherwise LGTM

Looks a bit strange to me to have `switch` statement with only 2 cases from which one is `default`, but otherwise LGTM
Author
Owner

Looks a bit strange to me to have switch statement with only 2 cases from which one is default, but otherwise LGTM

I thought you preferred switch over if/else @karasz

> Looks a bit strange to me to have `switch` statement with only 2 cases from which one is `default`, but otherwise LGTM I thought you preferred switch over if/else @karasz
Owner

Looks a bit strange to me to have switch statement with only 2 cases from which one is default, but otherwise LGTM

I thought you preferred switch over if/else @karasz

This would have been an

func....{
if err != nil {
    return err
}

return
}

for anything that has more than 2 branches I prefer switch as it seems to me more appropriate .

> > Looks a bit strange to me to have `switch` statement with only 2 cases from which one is `default`, but otherwise LGTM > > I thought you preferred switch over if/else @karasz This would have been an ```go func....{ if err != nil { return err } return } ``` for anything that has more than 2 branches I prefer `switch` as it seems to me more appropriate .
amery added 2 commits 2023-10-30 20:13:53 +01:00
Author
Owner

@karasz amended accordingly, and rebased over the current main

@karasz amended accordingly, and rebased over the current `main`
amery requested review from karasz 2023-10-30 20:27:33 +01:00
karasz approved these changes 2023-10-30 20:36:02 +01:00
karasz left a comment
Owner

+1

+1
amery merged commit 5ef6d45ef7 into main 2023-10-30 20:43:22 +01:00
amery deleted branch pr-amery-unmarshaltext 2023-10-30 20:43:22 +01:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: amery/jpictl#32