From b6f7dea961d5ddaf1f1a527442a20dc218147e54 Mon Sep 17 00:00:00 2001 From: netbenix Date: Sat, 30 Oct 2021 22:16:32 +0200 Subject: [PATCH] Started with RegistryList --- Tools/RegistryList.go | 24 ++++++++++++++++++++++++ lpm-cli.go | 1 - 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Tools/RegistryList.go diff --git a/Tools/RegistryList.go b/Tools/RegistryList.go new file mode 100644 index 0000000..26392ce --- /dev/null +++ b/Tools/RegistryList.go @@ -0,0 +1,24 @@ +package Tools + +import ( + "os" +) + +type RegistryList struct { + Registries []string +} + +func CheckIfRegistryFileExists() bool{ + _, dirErr := os.Stat("data") + _, fileErr := os.Stat("data/registry.list") + if dirErr != nil || fileErr != nil { + return false + } + return true +} + +func LoadRegistryList(){ + if CheckIfRegistryFileExists(){ + + } +} \ No newline at end of file diff --git a/lpm-cli.go b/lpm-cli.go index 2176935..38fc60a 100644 --- a/lpm-cli.go +++ b/lpm-cli.go @@ -9,7 +9,6 @@ import ( ) func main() { - Tools.LoggerInit() Tools.InfoLogger.Printf("Lotus-PM was executed")