672 return c.doTagQuery(ctx, false, query, limit)
673}
674
675func (c *IronDBGroup) ProbeTLDs(ctx context.Context) ([]string, merry.Error) {676 // ProbeTLDs is not really needed for IronDB but returning nil causing error
677 // so, let's return empty list
678 return []string{}, nil
668 return c.doTagQuery(ctx, true, query, limit)
669}
670
671func (c *IronDBGroup) TagValues(ctx context.Context, query string, limit int64) ([]string, merry.Error) {672 return c.doTagQuery(ctx, false, query, limit)
673}
674
664
665}
666
667func (c *IronDBGroup) TagNames(ctx context.Context, query string, limit int64) ([]string, merry.Error) {668 return c.doTagQuery(ctx, true, query, limit)
669}
670
552 return nil, nil, types.ErrNotSupportedByBackend
553}
554
555func (c *IronDBGroup) doTagQuery(ctx context.Context, isTagName bool, query string, limit int64) ([]string, merry.Error) {556 logger := c.logger
557 params := make(map[string][]string)
558 var result []string
548 return nil, nil, types.ErrNotImplementedYet
549}
550
551func (c *IronDBGroup) Stats(ctx context.Context) (*protov3.MetricDetailsResponse, *types.Stats, merry.Error) {552 return nil, nil, types.ErrNotSupportedByBackend
553}
554
(Go's FAQ)[https://go.dev/doc/faq#methodsonvaluesorpointers] recommends that method receivers should be consistent. If some of the methods of the type must have pointer receivers, the rest should too, so the method set is consistent regardless of how the type is used. This is because value and pointer receivers have different method sets.
package main
type foo struct {
a int
}
func (f foo) a() {}
func (f *foo) b() {
f.a = 10
}
package main
type foo struct {
a int
}
func (f *foo) a() {}
func (f *foo) b() {
f.a = 10
}