func (c *helperClient) Close() error {
	return c.client.Close()
}
Close releases any resources a Client may be using.
package influxdbhelper
import (
	"fmt"
	"regexp"
	"strings"
	"time"
	influxClient "github.com/influxdata/influxdb1-client/v2"
)
var reRemoveExtraSpace = regexp.MustCompile(`\s\s+`)
func CleanQuery(query string) string {
	ret := strings.Replace(query, "\n", "", -1)
	ret = reRemoveExtraSpace.ReplaceAllString(ret, " ")
	return ret
}
type Client interface {
	influxClient.Client
	UseDB(db string) Client
	UseMeasurement(measurement string) Client
	UseTimeField(fieldName string) Client
	DecodeQuery(query string, result interface{}) error
	WritePoint(data interface{}) error
	WritePointTagsFields(tags map[string]string, fields map[string]interface{}, t time.Time) error
}
type helperClient struct {
	url       string
	client    influxClient.Client
	precision string
	using     *helperUsing
}
type usingValue struct {
	value  string
	retain bool
}
type helperUsing struct {
	db          *usingValue
	measurement *usingValue
	timeField   *usingValue
}
func NewClient(url, user, passwd, precision string) (Client, error) {
	ret := &helperClient{
		url:       url,
		precision: precision,
	}
	client, err := influxClient.NewHTTPClient(influxClient.HTTPConfig{
		Addr:     url,
		Username: user,
		Password: passwd,
	})
	ret.client = client
	return ret, err
}
func (c *helperClient) Ping(timeout time.Duration) (time.Duration, string, error) {
	return c.client.Ping(timeout)
}
func (c *helperClient) Write(bp influxClient.BatchPoints) error {
	return c.client.Write(bp)
}
func (c *helperClient) Query(q influxClient.Query) (*influxClient.Response, error) {
	return c.client.Query(q)
}
func (c *helperClient) QueryAsChunk(q influxClient.Query) (*influxClient.ChunkedResponse, error) {
	return c.client.QueryAsChunk(q)
}