// Write the record's number and related flags to wr
Write the record's number and related flags to wr
// Write the record ' s number and related flags to wr
func (i *Record) String(flags ...flag) string {
    if strings.Contains(i.Number, "?") {
        flags = append(flags, "ILLEGAL")
    }
    if len(flags) == 0 {
        return i.Number
    }
    wr := &bytes.Buffer{}
    fmt.Fprintf(wr, i.Number)
    for _, flag := range flags {
        fmt.Fprintf(wr, " %v", flag)
    }
    return wr.String()
}
func ( i * Record ) String ( flags ... flag ) string { if strings . Contains ( i . Number , " " ) { flags = append ( flags , " " ) } if len ( flags ) == 0 { return i . Number } wr := & bytes . Buffer { } fmt . Fprintf ( wr , i . Number ) for _ , flag := range flags { fmt . Fprintf ( wr , " " , flag ) } return wr . String ( ) }
Write the record's number and related flags to wr
Write the record ' s number and related flags to wr