Started with RegistryList
This commit is contained in:
parent
90659dd8a4
commit
b6f7dea961
2 changed files with 24 additions and 1 deletions
24
Tools/RegistryList.go
Normal file
24
Tools/RegistryList.go
Normal file
|
|
@ -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(){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
Tools.LoggerInit()
|
Tools.LoggerInit()
|
||||||
|
|
||||||
Tools.InfoLogger.Printf("Lotus-PM was executed")
|
Tools.InfoLogger.Printf("Lotus-PM was executed")
|
||||||
|
|
|
||||||
Reference in a new issue