Hi,

Just an idea, not sure how to formally name it, neither i know if it was 
already suggested,

All about the writing,

        logged, err := view.Auth.IsLoggedIn()
        if err != nil {
            panic(err)
        }

Which now i write like this,
        logged, err := view.Auth.IsLoggedIn()
        MustNotErr(err)

Where MustNotErr is +/- func(err) {err!=nil && panic(err)}


Have you yet considered *something* like this ?
        logged, MustNotErr<- := view.Auth.IsLoggedIn()

Where MustNotErr would be invoked with the value of err, whatever it is nil 
or not, and deal with it.

A bit further, we could imagine,
        logged, LogIt(namespace)<- := view.Auth.IsLoggedIn()

Where LogIt would be a func(args ...watever) func(err error) { ... }

Does it make any sense to you too ?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to