5 ms·
> I get lost trying to figure what > the happy path behavior is. The happy path is idiomatically at indent level 0.
by sagichmal 12y ago
> I get lost trying to figure what
> the happy path behavior is.
The happy path is idiomatically at indent level 0.
- azth 12y agoExcept when it's if x, err := doSomething(); err != nil { }
- sagichmal 12y ago...the happy path there is intend level 0? if err := doSomething(); err != nil { return fmt.Errorf("something failed: %v", err) } Or, x, err := doSomething() if err != nil { return fmt.Errorf("something failed: %v", err) } log.Print(x)