We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c59813 commit 0f23f15Copy full SHA for 0f23f15
1 file changed
example/remote/main.go
@@ -23,9 +23,16 @@ func run() (err error) {
23
return fmt.Errorf("TURSO_URL environment variable not set")
24
}
25
26
+ sep := "?"
27
authToken := os.Getenv("TURSO_AUTH_TOKEN")
28
if authToken != "" {
- dbUrl += "?authToken=" + authToken
29
+ dbUrl += sep + "authToken=" + authToken
30
+ sep = "&"
31
+ }
32
+
33
+ remoteEncryptionKey := os.Getenv("TURSO_REMOTE_ENCRYPTION_KEY")
34
+ if remoteEncryptionKey != "" {
35
+ dbUrl += sep + "remoteEncryptionKey=" + remoteEncryptionKey
36
37
38
// Open database connection
0 commit comments