Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Clean up

Neeraj Gupta4c06ed01121f
diff --git a/cmd/config.go b/cmd/config.go
index 957373ec19..896edec53f 100644
--- a/cmd/config.go
+++ b/cmd/config.go
@@ -41,10 +41,6 @@ var host string
func init() {
// Set up Viper configuration
- viper.SetConfigName("config") // Name of your configuration file (e.g., config.yaml)
- viper.AddConfigPath(".") // Search for config file in the current directory
- viper.ReadInConfig() // Read the configuration file if it exists
-
// Set a default value for 'host' configuration
viper.SetDefault("host", "https://api.ente.io")
diff --git a/cmd/root.go b/cmd/root.go
index e72937ee50..343e5da399 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -2,6 +2,7 @@ package cmd
import (
"fmt"
+ "github.com/spf13/viper"
"os"
"github.com/spf13/cobra"
@@ -40,4 +41,7 @@ func init() {
// Cobra also supports local flags, which will only run
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
+ viper.SetConfigName("config") // Name of your configuration file (e.g., config.yaml)
+ viper.AddConfigPath(".") // Search for config file in the current directory
+ viper.ReadInConfig() // Read the configuration file if it exists
}
diff --git a/config.yaml b/config.yaml
new file mode 100644
index 0000000000..fea893ae2c
--- /dev/null
+++ b/config.yaml
@@ -0,0 +1 @@
+host: https://api.ente.io
diff --git a/pkg/account.go b/pkg/account.go
new file mode 100644
index 0000000000..c1caffeb1f
--- /dev/null
+++ b/pkg/account.go
@@ -0,0 +1 @@
+package pkg