Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

33 linhas
794 B

  1. package operation_setting
  2. import "strings"
  3. var DemoSiteEnabled = false
  4. var SelfUseModeEnabled = false
  5. var AutomaticDisableKeywords = []string{
  6. "Your credit balance is too low",
  7. "This organization has been disabled.",
  8. "You exceeded your current quota",
  9. "Permission denied",
  10. "The security token included in the request is invalid",
  11. "Operation not allowed",
  12. "Your account is not authorized",
  13. }
  14. func AutomaticDisableKeywordsToString() string {
  15. return strings.Join(AutomaticDisableKeywords, "\n")
  16. }
  17. func AutomaticDisableKeywordsFromString(s string) {
  18. AutomaticDisableKeywords = []string{}
  19. ak := strings.Split(s, "\n")
  20. for _, k := range ak {
  21. k = strings.TrimSpace(k)
  22. k = strings.ToLower(k)
  23. if k != "" {
  24. AutomaticDisableKeywords = append(AutomaticDisableKeywords, k)
  25. }
  26. }
  27. }