func stringPopulateAuxFieldsAndTags(ap *influxql.StringPoint, fieldsAndTags []string, fields models.Fields, tags models.Tags) { ap.Aux = make([]interface{}, len(fieldsAndTags)) for i, name := range fieldsAndTags { if f, ok := fields[name]; ok { ap.Aux[i] = f } else { ap.Aux[i] = tags[name] } } }
func TestPoint_Clone_Nil(t *testing.T) { var fp *influxql.FloatPoint if p := fp.Clone(); p != nil { t.Errorf("expected nil, got %v", p) } var ip *influxql.IntegerPoint if p := ip.Clone(); p != nil { t.Errorf("expected nil, got %v", p) } var sp *influxql.StringPoint if p := sp.Clone(); p != nil { t.Errorf("expected nil, got %v", p) } var bp *influxql.BooleanPoint if p := bp.Clone(); p != nil { t.Errorf("expected nil, got %v", p) } }