From a3578c57679a9b83056d44198c259e15e8447f83 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Wed, 19 Jul 2023 11:00:47 -0500 Subject: [PATCH] Use env vars for RPC --- html/main.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/main.go b/html/main.go index d9d547f..8899eae 100644 --- a/html/main.go +++ b/html/main.go @@ -81,7 +81,7 @@ type TorrentStatsPageData struct { } func main() { - transmissionbt, err := transmissionrpc.New("127.0.0.1", "", "", nil) + transmissionbt, err := transmissionrpc.New(os.Getenv("TRANSMISSION_RPC_URL"), os.Getenv("TRANSMISSION_RPC_USER"), os.Getenv("TRANSMISSION_RPC_PASSWORD"), nil) if err != nil { log.Fatalln(err) } diff --git a/main.go b/main.go index 86fb9d7..e315b46 100644 --- a/main.go +++ b/main.go @@ -83,7 +83,7 @@ func main() { fmt.Println("20 text/gemini\r") fmt.Println("```") - transmissionbt, err := transmissionrpc.New("", "", "", nil) + transmissionbt, err := transmissionrpc.New(os.Getenv("TRANSMISSION_RPC_URL"), os.Getenv("TRANSMISSION_RPC_USER"), os.Getenv("TRANSMISSION_RPC_PASSWORD"), nil) if err != nil { log.Fatalln(err) }