Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It would be nice if Go could do this sort of chaining like jQuery makes so easy with Javascript:

   n, err := object
     .Process1(arg1, arg2)
     .Process2(true)
     .Process3("foo")
That would make these sorts of chains much easier to read.


You can do that now, just move the dots to end of line

https://github.com/89z/googleplay/blob/v1.8.1/header.go#L126




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: