This commit is contained in:
@@ -35,6 +35,17 @@ func init() {
|
||||
datastorePath = filepath.Join(roaming, "cloudsave")
|
||||
}
|
||||
|
||||
func Get(server string) (string, string, error) {
|
||||
var err error
|
||||
store, err := load()
|
||||
if err == nil {
|
||||
if c, ok := store[server]; ok {
|
||||
return c.Username, c.Password, nil
|
||||
}
|
||||
}
|
||||
return "","",fmt.Errorf("not found")
|
||||
}
|
||||
|
||||
func Read(server string) (string, string, error) {
|
||||
var err error
|
||||
store, err := load()
|
||||
|
||||
Reference in New Issue
Block a user