func validFlag(b byte) bool {
	return (b == 'b' || b == 'd' || b == 'o' || b == 'x' || b == 'X' || b == 'e' || b == 'E' || b == 'f' || b == 'F' || b == 'g' || b == 'G' || b == 'r' || b == 't' || b == 's' || b == '%')
}
validFlags are 'bdoxXeEfFgGrts%'
package pyfmt
import (
	"errors"
	"fmt"
	"strconv"
	"strings"
	"unicode/utf8"
)
type flags struct {
	fillChar   rune
	align      int
	sign       string
	showRadix  bool
	minWidth   string
	precision  string
	renderVerb string
	percent    bool
	empty      bool
}
type render struct {
	buf *buffer
	val interface{}
	flags
}
func (r *render) init(buf *buffer) {
	r.buf = buf
	r.clearFlags()
}
func (r *render) clearFlags() {
	r.flags = flags{}
}
const (
	alignState = iota
	signState
	radixState
	zeroState
	widthState
	precisionState
	verbState
	endState
)