mirror of
https://github.com/iyear/tdl
synced 2025-01-09 04:17:35 +08:00
refactor(consts): home dir
This commit is contained in:
parent
df9f22f8a8
commit
e1045fbb5d
1
go.mod
1
go.mod
@ -9,7 +9,6 @@ require (
|
||||
github.com/gotd/contrib v0.13.0
|
||||
github.com/gotd/td v0.68.1
|
||||
github.com/jedib0t/go-pretty/v6 v6.3.8
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/spf13/cobra v1.5.0
|
||||
github.com/tcnksm/go-input v0.0.0-20180404061846-548a7d7a8ee8
|
||||
go.etcd.io/bbolt v1.3.6
|
||||
|
2
go.sum
2
go.sum
@ -84,8 +84,6 @@ github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peK
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
|
||||
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
|
@ -3,7 +3,6 @@ package consts
|
||||
import (
|
||||
"github.com/gotd/td/telegram"
|
||||
"github.com/iyear/tdl/global"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@ -38,7 +37,7 @@ const (
|
||||
)
|
||||
|
||||
func init() {
|
||||
dir, err := homedir.Dir()
|
||||
dir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user