cmd/madon.go
changeset 158 d5c2f8528af1
parent 55 e9df533a1c4f
child 185 564d92b54b00
equal deleted inserted replaced
157:908a433f02c0 158:d5c2f8528af1
    70 	gClient, err = madon.NewApp(AppName, AppWebsite, scopes, madon.NoRedirect, instanceURL)
    70 	gClient, err = madon.NewApp(AppName, AppWebsite, scopes, madon.NoRedirect, instanceURL)
    71 	if err != nil {
    71 	if err != nil {
    72 		return errors.Wrap(err, "app registration failed")
    72 		return errors.Wrap(err, "app registration failed")
    73 	}
    73 	}
    74 
    74 
    75 	errPrint("Registred new application.")
    75 	errPrint("Registered new application.")
    76 	return nil
    76 	return nil
    77 }
    77 }
    78 
    78 
    79 func madonLogin() error {
    79 func madonLogin() error {
    80 	if gClient == nil {
    80 	if gClient == nil {
    81 		return errors.New("application not registred")
    81 		return errors.New("application not registered")
    82 	}
    82 	}
    83 
    83 
    84 	token = viper.GetString("token")
    84 	token = viper.GetString("token")
    85 	login = viper.GetString("login")
    85 	login = viper.GetString("login")
    86 	password = viper.GetString("password")
    86 	password = viper.GetString("password")