Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 57a2914fe3 |
@@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"golang.org/x/term"
|
"golang.org/x/term"
|
||||||
@@ -16,12 +17,12 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
xdg_config_home, err := os.UserConfigDir()
|
config, err := os.UserConfigDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Unable to obtain user's configuration directory")
|
fmt.Println("Unable to obtain user's configuration directory")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
configPath := xdg_config_home + "/mikuru.ini"
|
configPath := config + "/mikuru.ini"
|
||||||
mikuru.Parse(configPath)
|
mikuru.Parse(configPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,9 +60,11 @@ func signin(cli *client.Client) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
token := strings.Trim(fmt.Sprintf(res.Token), "{}")
|
||||||
|
|
||||||
|
|
||||||
fmt.Println("Login successful")
|
fmt.Println("Login successful")
|
||||||
fmt.Println("Place this token in your configuration file for later use")
|
fmt.Println("Place this token in your configuration file for later use")
|
||||||
fmt.Println("Do not share it with anyone, it's classified information")
|
fmt.Println("Do not share it with anyone, it's classified information")
|
||||||
fmt.Println("Trim surrounding braces before usage")
|
fmt.Printf("token = %v\n", token)
|
||||||
fmt.Printf("token = %v\n", res)
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user