Skip to content

Commit

Permalink
fix: code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
alespour committed Aug 28, 2023
1 parent 7815259 commit 8e20cdf
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions influxdb3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,15 @@ func New(config ClientConfig) (*Client, error) {
}

// NewFromConnectionString creates new Client from the specified connection string.
// Example: `https://us-east-1-1.aws.cloud2.influxdata.com/?token=my-token&database=my-database`.
// Parameters:
// - connectionString: connection string in URL format.
// Supported query parameters:
// - `token` (required)
// - `organization`
// - `database`
// - `precision`
// - `gzipThreshold`
// - token (required)
// - organization
// - database
// - precision
// - gzipThreshold
// Example: https://us-east-1-1.aws.cloud2.influxdata.com/?token=my-token&database=my-database
func NewFromConnectionString(connectionString string) (*Client, error) {
cfg := ClientConfig{}
err := cfg.parse(connectionString)
Expand All @@ -129,10 +131,10 @@ func NewFromConnectionString(connectionString string) (*Client, error) {

// NewFromEnv creates new Client instance from environment variables.
// Supported variables:
// - `INFLUX_HOST` (required)
// - `INFLUX_TOKEN` (required)
// - `INFLUX_ORG`
// - `INFLUX_DATABASE`
// - INFLUX_HOST (required)
// - INFLUX_TOKEN (required)
// - INFLUX_ORG
// - INFLUX_DATABASE
func NewFromEnv() (*Client, error) {
cfg := ClientConfig{}
err := cfg.env()
Expand Down

0 comments on commit 8e20cdf

Please sign in to comment.