config.go
changeset 56 e25d0d0dc8ed
parent 51 4a0533d00053
child 59 dd2e302b56d9
equal deleted inserted replaced
55:59e1d6fb139f 56:e25d0d0dc8ed
    89 	}
    89 	}
    90 	return
    90 	return
    91 }
    91 }
    92 
    92 
    93 func GetInstanceList() (list []string) {
    93 func GetInstanceList() (list []string) {
    94 	list, err := filepath.Glob(filepath.Join(baseDir + "*.token"))
    94 	list, err := filepath.Glob(filepath.Join(baseDir, "*.token"))
       
    95 	log.Printf("basedir=%s", filepath.Join(baseDir, "*.token"))
    95 	if err != nil {
    96 	if err != nil {
    96 		log.Printf("warning, no *.token files")
    97 		log.Printf("warning, no *.token files")
    97 		list = nil
    98 		list = nil
    98 	}
    99 	}
       
   100 	log.Printf("list=%v", list)
    99 	return
   101 	return
   100 }
   102 }
   101 
   103 
   102 // LoadConfig reads a file as a TOML document and return the structure
   104 // LoadConfig reads a file as a TOML document and return the structure
   103 func LoadConfig(name string) (s *Server, err error) {
   105 func LoadConfig(name string) (s *Server, err error) {