table.go raw

   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  
  15  package rt
  16  
  17  import "unicode/utf8"
  18  
  19  var SafeSet = [utf8.RuneSelf]bool{
  20  	' ':      true,
  21  	'!':      true,
  22  	'"':      false,
  23  	'#':      true,
  24  	'$':      true,
  25  	'%':      true,
  26  	'&':      true,
  27  	'\'':     true,
  28  	'(':      true,
  29  	')':      true,
  30  	'*':      true,
  31  	'+':      true,
  32  	',':      true,
  33  	'-':      true,
  34  	'.':      true,
  35  	'/':      true,
  36  	'0':      true,
  37  	'1':      true,
  38  	'2':      true,
  39  	'3':      true,
  40  	'4':      true,
  41  	'5':      true,
  42  	'6':      true,
  43  	'7':      true,
  44  	'8':      true,
  45  	'9':      true,
  46  	':':      true,
  47  	';':      true,
  48  	'<':      true,
  49  	'=':      true,
  50  	'>':      true,
  51  	'?':      true,
  52  	'@':      true,
  53  	'A':      true,
  54  	'B':      true,
  55  	'C':      true,
  56  	'D':      true,
  57  	'E':      true,
  58  	'F':      true,
  59  	'G':      true,
  60  	'H':      true,
  61  	'I':      true,
  62  	'J':      true,
  63  	'K':      true,
  64  	'L':      true,
  65  	'M':      true,
  66  	'N':      true,
  67  	'O':      true,
  68  	'P':      true,
  69  	'Q':      true,
  70  	'R':      true,
  71  	'S':      true,
  72  	'T':      true,
  73  	'U':      true,
  74  	'V':      true,
  75  	'W':      true,
  76  	'X':      true,
  77  	'Y':      true,
  78  	'Z':      true,
  79  	'[':      true,
  80  	'\\':     false,
  81  	']':      true,
  82  	'^':      true,
  83  	'_':      true,
  84  	'`':      true,
  85  	'a':      true,
  86  	'b':      true,
  87  	'c':      true,
  88  	'd':      true,
  89  	'e':      true,
  90  	'f':      true,
  91  	'g':      true,
  92  	'h':      true,
  93  	'i':      true,
  94  	'j':      true,
  95  	'k':      true,
  96  	'l':      true,
  97  	'm':      true,
  98  	'n':      true,
  99  	'o':      true,
 100  	'p':      true,
 101  	'q':      true,
 102  	'r':      true,
 103  	's':      true,
 104  	't':      true,
 105  	'u':      true,
 106  	'v':      true,
 107  	'w':      true,
 108  	'x':      true,
 109  	'y':      true,
 110  	'z':      true,
 111  	'{':      true,
 112  	'|':      true,
 113  	'}':      true,
 114  	'~':      true,
 115  	'\u007f': true,
 116  }
 117  
 118  var Hex = "0123456789abcdef"
 119