3 ms·
Twitter clients are the new "Hello world" of programming. I wrote it to try out and get familiar with the language. While writing it I found a bug in JSON libr
by dchest 17y ago
Twitter clients are the new "Hello world" of programming. I wrote it to try out and get familiar with the language.
While writing it I found a bug in JSON library (http://code.google.com/p/go/issues/detail?id=73 http://code.google.com/p/go/issues/detail?id=73), which has been fixed quickly by Go developers (in less than an hour).
Currently their http library doesn't support basic authentication, and their http.send method, which allows tweaking headers, is private, so I had to copy and paste three methods from http package and add authentication (see http_auth.go).
The hardest part for me was to get those io things right (I was confused by []byte vs bytes package, and io.Writers/Readers).
I love cross-compilation: both binaries (for Mac OS X and Linux) were compiled on Mac.
- uriel 17y ago> I love cross-compilation: both binaries (for Mac OS X and Linux) were compiled on Mac. Indeed, the Plan 9/ken way of structuring compilers rocks. All compilation is cross-compilation! Simple, elegant, reliable.