if buf, err := json.Marshal(make(chan int)); err != nil { fmt.Println("Ehh..", err) return }
In this case, buf will not be available outside of the if statement. Go fmt can already leave your insignificant whitespace as is, I just wish it could also leave the if error != nil statement say in one line instead of formatting it to take three.
if buf, err := json.Marshal(make(chan int)); err != nil { fmt.Println("Ehh..", err) return }
In this case, buf will not be available outside of the if statement. Go fmt can already leave your insignificant whitespace as is, I just wish it could also leave the if error != nil statement say in one line instead of formatting it to take three.