Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

33 lignes
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. }