initial commit
applied patch from https://groups.google.com/d/msg/golang-dev/nA3QRGIvrOE/JmABTgizDAsJ