gofmt: minor refactor to permit easy testing
gofmt: minor refactor to permit easy testing

R=rsc
CC=golang-dev
http://codereview.appspot.com/4397046

pombredanne/go-deleteme,tv42/old-go,pombredanne/go-deleteme,apparentlymart/golang,apparentlymart/golang,dsriram/golang,tv42/old-go,tv42/old-go,ssrl/go,dsriram/golang,ssrl/go,ssrl/go,tv42/old-go,gnanderson/go,gnanderson/go,apparentlymart/golang,dsriram/golang,dsriram/golang,pombredanne/go-deleteme,gnanderson/go,dsriram/golang,ssrl/go,pombredanne/go-deleteme,ssrl/go,dsriram/golang,tv42/old-go,apparentlymart/golang,ssrl/go,gnanderson/go,gnanderson/go,dsriram/golang,tv42/old-go,apparentlymart/golang,tv42/old-go,gnanderson/go,pombredanne/go-deleteme,pombredanne/go-deleteme,ssrl/go,gnanderson/go,pombredanne/go-deleteme,apparentlymart/golang,apparentlymart/golang