From f544c47ab4da0a2e60d9d32ef75df9c10f79ed08 Mon Sep 17 00:00:00 2001 From: dingbo Date: Thu, 9 Jun 2022 17:04:48 +0800 Subject: [PATCH] docs: change varaible name --- docs-en/05-develop/01-connect/01-python.md | 4 ++-- docs-en/05-develop/01-connect/02-java.md | 4 ++-- docs-en/05-develop/01-connect/03-go.md | 4 ++-- docs-en/05-develop/01-connect/04-rust.md | 4 ++-- docs-en/05-develop/01-connect/05-node.md | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs-en/05-develop/01-connect/01-python.md b/docs-en/05-develop/01-connect/01-python.md index 48202137e8..3a2a920dd9 100644 --- a/docs-en/05-develop/01-connect/01-python.md +++ b/docs-en/05-develop/01-connect/01-python.md @@ -18,7 +18,7 @@ You'll need to have Python3 installed. Run this command in your terminal to save TDengine cloud token as variables: ```bash -export TDENGINE_TOKEN= +export TDENGINE_CLOUD_TOKEN= ``` @@ -36,7 +36,7 @@ Copy code bellow to your editor and run it with `python3` command. import taosrest import os -token = os.environ["TDENGINE_TOKEN"] +token = os.environ["TDENGINE_CLOUD_TOKEN"] url = "https://cloud.tdengine.com" conn = taosrest.connect(url=url, token=token) diff --git a/docs-en/05-develop/01-connect/02-java.md b/docs-en/05-develop/01-connect/02-java.md index f4cd583af4..3cb03b533e 100644 --- a/docs-en/05-develop/01-connect/02-java.md +++ b/docs-en/05-develop/01-connect/02-java.md @@ -29,7 +29,7 @@ Run this command in your terminal to save TDengine cloud token as variables: ```bash -export TDENGINE_TOKEN= +export TDENGINE_CLOUD_TOKEN= ``` ## Connect @@ -43,7 +43,7 @@ import java.sql.SQLException; public class ConnectCloudExample { public static void main(String[] args) throws SQLException { - String token = System.getenv("TDENGINE_TOKEN"); + String token = System.getenv("TDENGINE_CLOUD_TOKEN"); String jdbcUrl = "jdbc:TAOS-RS://cloud.taosdata.com:8085?usessl=true&token=" + token; Connection conn = DriverManager.getConnection(jdbcUrl); System.out.println("Connected"); diff --git a/docs-en/05-develop/01-connect/03-go.md b/docs-en/05-develop/01-connect/03-go.md index b8fce4aaee..e623ae7bc9 100644 --- a/docs-en/05-develop/01-connect/03-go.md +++ b/docs-en/05-develop/01-connect/03-go.md @@ -20,7 +20,7 @@ require github.com/taosdata/driver-go/v2 develop Run this command in your terminal to save TDengine cloud token as variables: ```bash -export TDENGINE_TOKEN= +export TDENGINE_CLOUD_TOKEN= ``` ## Connect @@ -37,7 +37,7 @@ import ( ) func main() { - token := os.Getenv("TDENGIN_TOKEN") + token := os.Getenv("TDENGINE_CLOUD_TOKEN") taosDSN := "https://cloud.taosdata.com?token=" + token taos, err := sql.Open("taosRestful", taosDSN) if err != nil { diff --git a/docs-en/05-develop/01-connect/04-rust.md b/docs-en/05-develop/01-connect/04-rust.md index c5cea9e7fe..0f3e11e647 100644 --- a/docs-en/05-develop/01-connect/04-rust.md +++ b/docs-en/05-develop/01-connect/04-rust.md @@ -15,7 +15,7 @@ title: Connect with Rust Connector Run this command in your terminal to save TDengine cloud token as variables: ```bash -export TDENGINE_TOKEN= +export TDENGINE_CLOUD_TOKEN= ``` ## Connect @@ -24,7 +24,7 @@ export TDENGINE_TOKEN= use libtaos::*; fn main() { - let token = std::env::var("TDENGINE_TOKEN").unwrap(); + let token = std::env::var("TDENGINE_CLOUD_TOKEN").unwrap(); let dsn = format!("https://cloud.tdengine.com?token={}", token); let taos = Taos::from_dsn(dsn)?; } diff --git a/docs-en/05-develop/01-connect/05-node.md b/docs-en/05-develop/01-connect/05-node.md index 4d3808f8e4..4da75ab3c6 100644 --- a/docs-en/05-develop/01-connect/05-node.md +++ b/docs-en/05-develop/01-connect/05-node.md @@ -12,7 +12,7 @@ title: Connect with Node.js Connector Run this command in your terminal to save TDengine cloud token as variables: ```bash -export TDENGINE_TOKEN= +export TDENGINE_CLOUD_TOKEN= ``` @@ -24,7 +24,7 @@ const { options, connect } = require("td2.0-rest-connector"); async function test() { options.url = "https://cloud.tdengine.com"; - options.token = process.env.TDENGIN_TOKEN; + options.token = process.env.TDENGINE_CLOUD_TOKEN; let conn = connect(options); } test(); -- GitLab