added tag flag utils, extracted from go/build