table.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // Copyright 2024 CloudWeGo Authors
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // https://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package rt
  15. import "unicode/utf8"
  16. var SafeSet = [utf8.RuneSelf]bool{
  17. ' ': true,
  18. '!': true,
  19. '"': false,
  20. '#': true,
  21. '$': true,
  22. '%': true,
  23. '&': true,
  24. '\'': true,
  25. '(': true,
  26. ')': true,
  27. '*': true,
  28. '+': true,
  29. ',': true,
  30. '-': true,
  31. '.': true,
  32. '/': true,
  33. '0': true,
  34. '1': true,
  35. '2': true,
  36. '3': true,
  37. '4': true,
  38. '5': true,
  39. '6': true,
  40. '7': true,
  41. '8': true,
  42. '9': true,
  43. ':': true,
  44. ';': true,
  45. '<': true,
  46. '=': true,
  47. '>': true,
  48. '?': true,
  49. '@': true,
  50. 'A': true,
  51. 'B': true,
  52. 'C': true,
  53. 'D': true,
  54. 'E': true,
  55. 'F': true,
  56. 'G': true,
  57. 'H': true,
  58. 'I': true,
  59. 'J': true,
  60. 'K': true,
  61. 'L': true,
  62. 'M': true,
  63. 'N': true,
  64. 'O': true,
  65. 'P': true,
  66. 'Q': true,
  67. 'R': true,
  68. 'S': true,
  69. 'T': true,
  70. 'U': true,
  71. 'V': true,
  72. 'W': true,
  73. 'X': true,
  74. 'Y': true,
  75. 'Z': true,
  76. '[': true,
  77. '\\': false,
  78. ']': true,
  79. '^': true,
  80. '_': true,
  81. '`': true,
  82. 'a': true,
  83. 'b': true,
  84. 'c': true,
  85. 'd': true,
  86. 'e': true,
  87. 'f': true,
  88. 'g': true,
  89. 'h': true,
  90. 'i': true,
  91. 'j': true,
  92. 'k': true,
  93. 'l': true,
  94. 'm': true,
  95. 'n': true,
  96. 'o': true,
  97. 'p': true,
  98. 'q': true,
  99. 'r': true,
  100. 's': true,
  101. 't': true,
  102. 'u': true,
  103. 'v': true,
  104. 'w': true,
  105. 'x': true,
  106. 'y': true,
  107. 'z': true,
  108. '{': true,
  109. '|': true,
  110. '}': true,
  111. '~': true,
  112. '\u007f': true,
  113. }
  114. var Hex = "0123456789abcdef"