cmd/seqinfo/seqinfo.go
func printPlainResults(results Results) error {
	for _, res := range results {
		// Explicitely start with the string and error output
		fmt.Printf("Source = %s\n", res.origString)
		fmt.Printf("    String = %s\n", res.String)

		if res.Error != "" {
			fmt.Printf("    Error = %s\n", res.Error)
			continue
		}

		// Dynamically loop over the rest of the fields
		typ := reflect.TypeOf(*res)
		val := reflect.ValueOf(*res)

		for i := 0; i < typ.NumField(); i++ {
			field := typ.Field(i)
			if field.Name == "Error" || field.Name == "String" {
				continue
			}
			if field.PkgPath != "" {
				// ignore unexported fields
				continue
			}
			fmt.Printf("    %s = %v\n", field.Name, val.Field(i).Interface())
		}

		fmt.Print("\n")
	}
	return nil
}
func printPlainResults(results Results) error {
	for _, res := range results {
		// Explicitely start with the string and error output
		fmt.Printf("Source = %s\n", res.origString)
		fmt.Printf("    String = %s\n", res.String)

		if res.Error != "" {
			fmt.Printf("    Error = %s\n", res.Error)
			continue
		}

		// Dynamically loop over the rest of the fields
		typ := reflect.TypeOf(*res)
		val := reflect.ValueOf(*res)

		for i := 0; i < typ.NumField(); i++ {
			field := typ.Field(i)
			if field.Name == "Error" || field.Name == "String" {
				continue
			}
			if field.PkgPath != "" {
				// ignore unexported fields
				continue
			}
			fmt.Printf("    %s = %v\n", field.Name, val.Field(i).Interface())
		}

		fmt.Print("\n")
	}
	return nil
}
// printPlainResults prints plain-text output for results