func columnNameFromTag(tags reflect.StructTag) string {
	scan := newScanner(tags)
	if scan == nil {
		return ""
	}
	for scan.Scan() {
		tok, lit := scan.Token(), scan.Text()
		switch tok {
		case scanner.KEYWORD:
			// exit on first keyword, no column specified
			return ""
		case scanner.IDENT:
			// first identifier indicates the column name, and
			// may be quoted
			return scanner.Unquote(lit)
		case scanner.LITERAL:
			if scanner.IsQuoted(lit) {
				// a string literal is accepted as the column name
				return scanner.Unquote(lit)
			}
		case scanner.OP:
			if lit == "-" {
				// indicates should not be a column
				return lit
			}
		}
	}
	return ""
}
// columnNameFromTag returns the column name from the field tag,
// or the empty string if none specified.
columnNameFromTag returns the column name from the field tag,
or the empty string if none specified.
// columnNameFromTag returns the column name from the field tag // or the empty string if none specified .
func columnNameFromTag(tags reflect.StructTag) string {
	scan := newScanner(tags)
	if scan == nil {
		return ""
	}
	for scan.Scan() {
		tok, lit := scan.Token(), scan.Text()
		switch tok {
		case scanner.KEYWORD:
			return ""
		case scanner.IDENT:
			return scanner.Unquote(lit)
		case scanner.LITERAL:
			if scanner.IsQuoted(lit) {
				return scanner.Unquote(lit)
			}
		case scanner.OP:
			if lit == "-" {
				return lit
			}
		}
	}
	return ""
}
func columnNameFromTag ( tags reflect . StructTag ) string { scan := newScanner ( tags ) if scan == nil { return " " } for scan . Scan ( ) { tok , lit := scan . Token ( ) , scan . Text ( ) switch tok { case scanner . KEYWORD : return " " case scanner . IDENT : return scanner . Unquote ( lit ) case scanner . LITERAL : if scanner . IsQuoted ( lit ) { return scanner . Unquote ( lit ) } case scanner . OP : if lit == " " { return lit } } } return " " }
columnNameFromTag returns the column name from the field tag,
or the empty string if none specified.
columnNameFromTag returns the column name from the field tag or the empty string if none specified .
// exit on first keyword, no column specified // first identifier indicates the column name, and // may be quoted // a string literal is accepted as the column name // indicates should not be a column