@enjoys/context-engine 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/data/commands/adb.json +322 -0
  2. package/data/commands/alembic.json +301 -0
  3. package/data/commands/artisan.json +277 -0
  4. package/data/commands/atlas.json +426 -0
  5. package/data/commands/auth0.json +648 -0
  6. package/data/commands/bat.json +84 -0
  7. package/data/commands/bundle.json +321 -0
  8. package/data/commands/composer.json +507 -0
  9. package/data/commands/dart.json +216 -0
  10. package/data/commands/dbmate.json +257 -0
  11. package/data/commands/docker-compose.json +384 -0
  12. package/data/commands/drizzle-kit.json +217 -0
  13. package/data/commands/expo.json +65 -0
  14. package/data/commands/fastlane.json +243 -0
  15. package/data/commands/fd.json +86 -0
  16. package/data/commands/flutter.json +298 -0
  17. package/data/commands/flyway.json +261 -0
  18. package/data/commands/fzf.json +103 -0
  19. package/data/commands/gem.json +267 -0
  20. package/data/commands/jq.json +100 -0
  21. package/data/commands/k9s.json +62 -0
  22. package/data/commands/liquibase.json +399 -0
  23. package/data/commands/manifest.json +619 -0
  24. package/data/commands/minikube.json +60 -0
  25. package/data/commands/ng.json +64 -0
  26. package/data/commands/nuxt.json +60 -0
  27. package/data/commands/php.json +157 -0
  28. package/data/commands/pm2.json +259 -0
  29. package/data/commands/pod.json +175 -0
  30. package/data/commands/prisma.json +257 -0
  31. package/data/commands/rails.json +372 -0
  32. package/data/commands/rake.json +360 -0
  33. package/data/commands/react-native.json +57 -0
  34. package/data/commands/rg.json +103 -0
  35. package/data/commands/rspec.json +257 -0
  36. package/data/commands/ruby.json +108 -0
  37. package/data/commands/sequelize.json +342 -0
  38. package/data/commands/snyk.json +442 -0
  39. package/data/commands/sonar-scanner.json +219 -0
  40. package/data/commands/stripe.json +314 -0
  41. package/data/commands/symfony.json +449 -0
  42. package/data/commands/tmux.json +197 -0
  43. package/data/commands/trivy.json +367 -0
  44. package/data/commands/twilio.json +382 -0
  45. package/data/commands/typeorm.json +262 -0
  46. package/data/commands/vue.json +60 -0
  47. package/data/commands/wp.json +857 -0
  48. package/data/commands/xcodebuild.json +141 -0
  49. package/data/commands/yq.json +57 -0
  50. package/data/completion/bash.json +1184 -0
  51. package/data/completion/c.json +1067 -0
  52. package/data/completion/cpp.json +824 -0
  53. package/data/completion/csharp.json +860 -0
  54. package/data/completion/dockerfile.json +536 -0
  55. package/data/completion/go.json +1346 -0
  56. package/data/completion/html.json +806 -0
  57. package/data/completion/java.json +1112 -0
  58. package/data/completion/javascript.json +914 -0
  59. package/data/completion/lua.json +968 -0
  60. package/data/completion/php.json +1535 -0
  61. package/data/completion/python.json +1427 -0
  62. package/data/completion/ruby.json +1531 -0
  63. package/data/completion/rust.json +698 -0
  64. package/data/completion/sql.json +887 -0
  65. package/data/completion/toml.json +428 -0
  66. package/data/completion/typescript.json +338 -0
  67. package/data/completion/yaml.json +563 -0
  68. package/data/defination/bash.json +565 -0
  69. package/data/defination/c.json +865 -0
  70. package/data/defination/cpp.json +348 -0
  71. package/data/defination/csharp.json +144 -0
  72. package/data/defination/dockerfile.json +113 -0
  73. package/data/defination/go.json +561 -0
  74. package/data/defination/html.json +559 -0
  75. package/data/defination/java.json +184 -0
  76. package/data/defination/javascript.json +265 -0
  77. package/data/defination/lua.json +181 -0
  78. package/data/defination/php.json +726 -0
  79. package/data/defination/python.json +717 -0
  80. package/data/defination/ruby.json +670 -0
  81. package/data/defination/rust.json +207 -0
  82. package/data/defination/sql.json +473 -0
  83. package/data/defination/toml.json +251 -0
  84. package/data/defination/typescript.json +29 -0
  85. package/data/defination/yaml.json +197 -0
  86. package/data/hover/bash.json +245 -0
  87. package/data/hover/c.json +265 -0
  88. package/data/hover/cpp.json +210 -0
  89. package/data/hover/csharp.json +290 -0
  90. package/data/hover/dockerfile.json +145 -0
  91. package/data/hover/go.json +580 -0
  92. package/data/hover/html.json +250 -0
  93. package/data/hover/java.json +395 -0
  94. package/data/hover/javascript.json +330 -0
  95. package/data/hover/lua.json +265 -0
  96. package/data/hover/php.json +300 -0
  97. package/data/hover/python.json +380 -0
  98. package/data/hover/ruby.json +265 -0
  99. package/data/hover/rust.json +275 -0
  100. package/data/hover/sql.json +230 -0
  101. package/data/hover/toml.json +145 -0
  102. package/data/hover/typescript.json +120 -0
  103. package/data/hover/yaml.json +165 -0
  104. package/data/manifest.json +242 -0
  105. package/package.json +1 -1
@@ -0,0 +1,580 @@
1
+ {
2
+ "language": "go",
3
+ "hovers": {
4
+ "make": {
5
+ "contents": [
6
+ { "value": "```go\nfunc make(t Type, size ...IntegerType) Type\n```\nAllocates and initializes an object of type slice, map, or chan (only). Like `new`, the first argument is a type, not a value. Unlike `new`, `make`'s return type is the same as the type of its argument, not a pointer to it. For slices, the size specifies the length; a second integer specifies the capacity." }
7
+ ]
8
+ },
9
+ "new": {
10
+ "contents": [
11
+ { "value": "```go\nfunc new(Type) *Type\n```\nAllocates memory for a value of the specified type, initializes it to the zero value, and returns a pointer to it." }
12
+ ]
13
+ },
14
+ "append": {
15
+ "contents": [
16
+ { "value": "```go\nfunc append(slice []Type, elems ...Type) []Type\n```\nAppends elements to the end of a slice. If the slice has sufficient capacity, the destination is resliced to accommodate the new elements. If it does not, a new underlying array is allocated." }
17
+ ]
18
+ },
19
+ "copy": {
20
+ "contents": [
21
+ { "value": "```go\nfunc copy(dst, src []Type) int\n```\nCopies elements from a source slice into a destination slice. Returns the number of elements copied, which is the minimum of `len(src)` and `len(dst)`. Also supports copying from a string into `[]byte`." }
22
+ ]
23
+ },
24
+ "delete": {
25
+ "contents": [
26
+ { "value": "```go\nfunc delete(m map[Type]Type1, key Type)\n```\nDeletes the element with the specified key from the map. If the map is nil or there is no such element, `delete` is a no-op." }
27
+ ]
28
+ },
29
+ "len": {
30
+ "contents": [
31
+ { "value": "```go\nfunc len(v Type) int\n```\nReturns the length of `v` according to its type: number of elements in an array, pointer to array, slice, map, or channel buffer; number of bytes in a string." }
32
+ ]
33
+ },
34
+ "cap": {
35
+ "contents": [
36
+ { "value": "```go\nfunc cap(v Type) int\n```\nReturns the capacity of `v` according to its type: maximum length a slice can reach when resliced; length of the underlying array; or buffer capacity of a channel." }
37
+ ]
38
+ },
39
+ "close": {
40
+ "contents": [
41
+ { "value": "```go\nfunc close(c chan<- Type)\n```\nCloses the channel, indicating that no more values will be sent on it. Only the sender should close a channel, never the receiver. Sending to or closing an already-closed channel causes a panic." }
42
+ ]
43
+ },
44
+ "panic": {
45
+ "contents": [
46
+ { "value": "```go\nfunc panic(v any)\n```\nStops normal execution of the current goroutine. When a function F calls `panic`, normal execution of F stops immediately. Any deferred functions run, then F returns to its caller, which treats the call as a `panic`." }
47
+ ]
48
+ },
49
+ "recover": {
50
+ "contents": [
51
+ { "value": "```go\nfunc recover() any\n```\nAllows a program to manage behavior of a panicking goroutine. Executing a call to `recover` inside a deferred function stops the panicking sequence and returns the value passed to `panic`. Outside deferred functions, `recover` always returns `nil`." }
52
+ ]
53
+ },
54
+ "complex": {
55
+ "contents": [
56
+ { "value": "```go\nfunc complex(r, i FloatType) ComplexType\n```\nConstructs a complex value from two floating-point values. The real and imaginary parts must be of the same size (`float32` → `complex64`, `float64` → `complex128`)." }
57
+ ]
58
+ },
59
+ "real": {
60
+ "contents": [
61
+ { "value": "```go\nfunc real(c ComplexType) FloatType\n```\nReturns the real part of the complex number `c`. The return type is `float32` for `complex64` arguments, and `float64` for `complex128`." }
62
+ ]
63
+ },
64
+ "imag": {
65
+ "contents": [
66
+ { "value": "```go\nfunc imag(c ComplexType) FloatType\n```\nReturns the imaginary part of the complex number `c`. The return type is `float32` for `complex64` arguments, and `float64` for `complex128`." }
67
+ ]
68
+ },
69
+ "clear": {
70
+ "contents": [
71
+ { "value": "```go\nfunc clear[T ~[]Type | ~map[Type]Type1](t T)\n```\n(Go 1.21+) For maps, deletes all entries, resulting in an empty map. For slices, sets all elements up to the length to the zero value of the element type." }
72
+ ]
73
+ },
74
+ "min": {
75
+ "contents": [
76
+ { "value": "```go\nfunc min[T cmp.Ordered](x T, y ...T) T\n```\n(Go 1.21+) Returns the smallest value among its arguments. Works with any ordered type (integers, floats, strings)." }
77
+ ]
78
+ },
79
+ "max": {
80
+ "contents": [
81
+ { "value": "```go\nfunc max[T cmp.Ordered](x T, y ...T) T\n```\n(Go 1.21+) Returns the largest value among its arguments. Works with any ordered type (integers, floats, strings)." }
82
+ ]
83
+ },
84
+ "print": {
85
+ "contents": [
86
+ { "value": "```go\nfunc print(args ...Type)\n```\nFormats its arguments in an implementation-specific way and writes the result to standard error. Useful for bootstrapping and debugging; not guaranteed to stay in the language. Use `fmt` package for production code." }
87
+ ]
88
+ },
89
+ "println": {
90
+ "contents": [
91
+ { "value": "```go\nfunc println(args ...Type)\n```\nFormats its arguments in an implementation-specific way, adds spaces between arguments, and writes a newline to standard error. Use `fmt.Println` for production code." }
92
+ ]
93
+ },
94
+ "error": {
95
+ "contents": [
96
+ { "value": "```go\ntype error interface {\n Error() string\n}\n```\nThe built-in error interface type. The conventional interface for representing an error condition, with the `nil` value representing no error." }
97
+ ]
98
+ },
99
+ "string": {
100
+ "contents": [
101
+ { "value": "```go\ntype string\n```\nThe set of all strings of 8-bit bytes, conventionally but not necessarily representing UTF-8-encoded text. A string may be empty, but not nil. Values of string type are immutable." }
102
+ ]
103
+ },
104
+ "int": {
105
+ "contents": [
106
+ { "value": "```go\ntype int\n```\nA signed integer type that is at least 32 bits in size. It is a distinct type, however, and not an alias for, say, `int32`. The size is platform-dependent: 32 bits on 32-bit systems, 64 bits on 64-bit systems." }
107
+ ]
108
+ },
109
+ "float64": {
110
+ "contents": [
111
+ { "value": "```go\ntype float64\n```\nThe set of all IEEE-754 64-bit floating-point numbers. The default floating-point type in Go." }
112
+ ]
113
+ },
114
+ "bool": {
115
+ "contents": [
116
+ { "value": "```go\ntype bool\n```\nThe set of boolean values, `true` and `false`. The zero value is `false`." }
117
+ ]
118
+ },
119
+ "byte": {
120
+ "contents": [
121
+ { "value": "```go\ntype byte = uint8\n```\nAn alias for `uint8`. Conventionally used to distinguish byte values from 8-bit unsigned integer values." }
122
+ ]
123
+ },
124
+ "rune": {
125
+ "contents": [
126
+ { "value": "```go\ntype rune = int32\n```\nAn alias for `int32`. Conventionally used to distinguish character values from integer values. Represents a Unicode code point." }
127
+ ]
128
+ },
129
+ "any": {
130
+ "contents": [
131
+ { "value": "```go\ntype any = interface{}\n```\n(Go 1.18+) An alias for `interface{}`. Can hold a value of any type." }
132
+ ]
133
+ },
134
+ "comparable": {
135
+ "contents": [
136
+ { "value": "```go\ntype comparable interface{ comparable }\n```\n(Go 1.18+) An interface implemented by all comparable types (booleans, numbers, strings, pointers, channels, arrays of comparable types, structs whose fields are all comparable types). Used as a type constraint." }
137
+ ]
138
+ },
139
+ "fmt.Println": {
140
+ "contents": [
141
+ { "value": "```go\nfunc fmt.Println(a ...any) (n int, err error)\n```\nFormats using the default formats for its operands and writes to standard output. Spaces are always added between operands and a newline is appended. Returns the number of bytes written and any write error encountered." }
142
+ ]
143
+ },
144
+ "fmt.Printf": {
145
+ "contents": [
146
+ { "value": "```go\nfunc fmt.Printf(format string, a ...any) (n int, err error)\n```\nFormats according to a format specifier and writes to standard output. Returns the number of bytes written and any write error encountered." }
147
+ ]
148
+ },
149
+ "fmt.Sprintf": {
150
+ "contents": [
151
+ { "value": "```go\nfunc fmt.Sprintf(format string, a ...any) string\n```\nFormats according to a format specifier and returns the resulting string." }
152
+ ]
153
+ },
154
+ "fmt.Errorf": {
155
+ "contents": [
156
+ { "value": "```go\nfunc fmt.Errorf(format string, a ...any) error\n```\nFormats according to a format specifier and returns the string as a value that satisfies `error`. Use `%w` to wrap an error so it can be unwrapped with `errors.Is` / `errors.As`." }
157
+ ]
158
+ },
159
+ "fmt.Fprintf": {
160
+ "contents": [
161
+ { "value": "```go\nfunc fmt.Fprintf(w io.Writer, format string, a ...any) (n int, err error)\n```\nFormats according to a format specifier and writes to `w`. Returns the number of bytes written and any write error encountered." }
162
+ ]
163
+ },
164
+ "fmt.Sscanf": {
165
+ "contents": [
166
+ { "value": "```go\nfunc fmt.Sscanf(str string, format string, a ...any) (n int, err error)\n```\nScans the argument string, storing successive space-separated values into successive arguments as determined by the format. Returns the number of items successfully scanned." }
167
+ ]
168
+ },
169
+ "fmt.Stringer": {
170
+ "contents": [
171
+ { "value": "```go\ntype fmt.Stringer interface {\n String() string\n}\n```\nThe `Stringer` interface is implemented by any value that has a `String` method, which defines the \"native\" format for that value. The `String` method is used by `fmt` package printing functions." }
172
+ ]
173
+ },
174
+ "os.Open": {
175
+ "contents": [
176
+ { "value": "```go\nfunc os.Open(name string) (*os.File, error)\n```\nOpens the named file for reading. If successful, methods on the returned `File` can be used for reading; the associated file descriptor has mode `O_RDONLY`." }
177
+ ]
178
+ },
179
+ "os.Create": {
180
+ "contents": [
181
+ { "value": "```go\nfunc os.Create(name string) (*os.File, error)\n```\nCreates or truncates the named file. If the file already exists, it is truncated. If it does not exist, it is created with mode 0666 (before umask). The `File` is opened for writing." }
182
+ ]
183
+ },
184
+ "os.ReadFile": {
185
+ "contents": [
186
+ { "value": "```go\nfunc os.ReadFile(name string) ([]byte, error)\n```\nReads the named file and returns the contents. A successful call returns `err == nil`, not `err == io.EOF`." }
187
+ ]
188
+ },
189
+ "os.WriteFile": {
190
+ "contents": [
191
+ { "value": "```go\nfunc os.WriteFile(name string, data []byte, perm os.FileMode) error\n```\nWrites data to the named file, creating it if necessary. If the file does not exist, `WriteFile` creates it with permissions `perm`; otherwise it truncates it before writing." }
192
+ ]
193
+ },
194
+ "os.Exit": {
195
+ "contents": [
196
+ { "value": "```go\nfunc os.Exit(code int)\n```\nCauses the current program to exit with the given status code. Conventionally, code zero indicates success, non-zero an error. The program terminates immediately; deferred functions are not run." }
197
+ ]
198
+ },
199
+ "os.Getenv": {
200
+ "contents": [
201
+ { "value": "```go\nfunc os.Getenv(key string) string\n```\nRetrieves the value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present." }
202
+ ]
203
+ },
204
+ "os.Setenv": {
205
+ "contents": [
206
+ { "value": "```go\nfunc os.Setenv(key, value string) error\n```\nSets the value of the environment variable named by the key." }
207
+ ]
208
+ },
209
+ "os.MkdirAll": {
210
+ "contents": [
211
+ { "value": "```go\nfunc os.MkdirAll(path string, perm os.FileMode) error\n```\nCreates a directory named path, along with any necessary parents, and returns `nil`, or else returns an error." }
212
+ ]
213
+ },
214
+ "os.Remove": {
215
+ "contents": [
216
+ { "value": "```go\nfunc os.Remove(name string) error\n```\nRemoves the named file or (empty) directory. If there is an error, it will be of type `*PathError`." }
217
+ ]
218
+ },
219
+ "io.Reader": {
220
+ "contents": [
221
+ { "value": "```go\ntype io.Reader interface {\n Read(p []byte) (n int, err error)\n}\n```\nThe interface that wraps the basic `Read` method. `Read` reads up to `len(p)` bytes into `p`. It returns the number of bytes read and any error encountered. At end of input, `Read` returns `0, io.EOF`." }
222
+ ]
223
+ },
224
+ "io.Writer": {
225
+ "contents": [
226
+ { "value": "```go\ntype io.Writer interface {\n Write(p []byte) (n int, err error)\n}\n```\nThe interface that wraps the basic `Write` method. `Write` writes `len(p)` bytes from `p` to the underlying data stream." }
227
+ ]
228
+ },
229
+ "io.ReadAll": {
230
+ "contents": [
231
+ { "value": "```go\nfunc io.ReadAll(r io.Reader) ([]byte, error)\n```\nReads from `r` until an error or EOF and returns the data it read. A successful call returns `err == nil`, not `err == io.EOF`." }
232
+ ]
233
+ },
234
+ "io.Copy": {
235
+ "contents": [
236
+ { "value": "```go\nfunc io.Copy(dst io.Writer, src io.Reader) (written int64, err error)\n```\nCopies from `src` to `dst` until either EOF is reached on `src` or an error occurs. Returns the number of bytes copied and the first error encountered while copying, if any." }
237
+ ]
238
+ },
239
+ "io.NopCloser": {
240
+ "contents": [
241
+ { "value": "```go\nfunc io.NopCloser(r io.Reader) io.ReadCloser\n```\nReturns a `ReadCloser` with a no-op `Close` method wrapping the provided `Reader r`." }
242
+ ]
243
+ },
244
+ "strings.Contains": {
245
+ "contents": [
246
+ { "value": "```go\nfunc strings.Contains(s, substr string) bool\n```\nReports whether `substr` is within `s`." }
247
+ ]
248
+ },
249
+ "strings.HasPrefix": {
250
+ "contents": [
251
+ { "value": "```go\nfunc strings.HasPrefix(s, prefix string) bool\n```\nReports whether the string `s` begins with `prefix`." }
252
+ ]
253
+ },
254
+ "strings.Split": {
255
+ "contents": [
256
+ { "value": "```go\nfunc strings.Split(s, sep string) []string\n```\nSlices `s` into all substrings separated by `sep` and returns a slice of the substrings between those separators." }
257
+ ]
258
+ },
259
+ "strings.Join": {
260
+ "contents": [
261
+ { "value": "```go\nfunc strings.Join(elems []string, sep string) string\n```\nConcatenates the elements of its first argument to create a single string. The separator string `sep` is placed between elements." }
262
+ ]
263
+ },
264
+ "strings.TrimSpace": {
265
+ "contents": [
266
+ { "value": "```go\nfunc strings.TrimSpace(s string) string\n```\nReturns a slice of the string `s`, with all leading and trailing white space removed, as defined by Unicode." }
267
+ ]
268
+ },
269
+ "strings.Replace": {
270
+ "contents": [
271
+ { "value": "```go\nfunc strings.Replace(s, old, new string, n int) string\n```\nReturns a copy of the string `s` with the first `n` non-overlapping instances of `old` replaced by `new`. If `n < 0`, there is no limit on the number of replacements." }
272
+ ]
273
+ },
274
+ "strings.Builder": {
275
+ "contents": [
276
+ { "value": "```go\ntype strings.Builder struct { ... }\n```\nA `Builder` is used to efficiently build a string using `WriteString` and `Write` methods. It minimizes memory copying. The zero value is ready to use. Do not copy a non-zero Builder." }
277
+ ]
278
+ },
279
+ "strconv.Atoi": {
280
+ "contents": [
281
+ { "value": "```go\nfunc strconv.Atoi(s string) (int, error)\n```\nEquivalent to `ParseInt(s, 10, 0)`, converted to type `int`. Parses a string as a decimal integer." }
282
+ ]
283
+ },
284
+ "strconv.Itoa": {
285
+ "contents": [
286
+ { "value": "```go\nfunc strconv.Itoa(i int) string\n```\nEquivalent to `FormatInt(int64(i), 10)`. Returns the string representation of `i`." }
287
+ ]
288
+ },
289
+ "strconv.FormatFloat": {
290
+ "contents": [
291
+ { "value": "```go\nfunc strconv.FormatFloat(f float64, fmt byte, prec, bitSize int) string\n```\nConverts the floating-point number `f` to a string according to the format `fmt` and precision `prec`. The `bitSize` is 32 for `float32` and 64 for `float64`." }
292
+ ]
293
+ },
294
+ "strconv.ParseInt": {
295
+ "contents": [
296
+ { "value": "```go\nfunc strconv.ParseInt(s string, base int, bitSize int) (int64, error)\n```\nInterprets a string `s` in the given base (0, 2 to 36) and bit size (0 to 64) and returns the corresponding value." }
297
+ ]
298
+ },
299
+ "json.Marshal": {
300
+ "contents": [
301
+ { "value": "```go\nfunc json.Marshal(v any) ([]byte, error)\n```\nReturns the JSON encoding of `v`. Struct fields are encoded using the struct field name or the `json` tag if present." }
302
+ ]
303
+ },
304
+ "json.Unmarshal": {
305
+ "contents": [
306
+ { "value": "```go\nfunc json.Unmarshal(data []byte, v any) error\n```\nParses the JSON-encoded data and stores the result in the value pointed to by `v`. If `v` is nil or not a pointer, `Unmarshal` returns an error." }
307
+ ]
308
+ },
309
+ "json.NewEncoder": {
310
+ "contents": [
311
+ { "value": "```go\nfunc json.NewEncoder(w io.Writer) *json.Encoder\n```\nReturns a new encoder that writes to `w`. Call `Encode(v)` to write the JSON encoding of `v` to the stream, followed by a newline character." }
312
+ ]
313
+ },
314
+ "json.NewDecoder": {
315
+ "contents": [
316
+ { "value": "```go\nfunc json.NewDecoder(r io.Reader) *json.Decoder\n```\nReturns a new decoder that reads from `r`. Call `Decode(&v)` to decode the next JSON value from the input and store it in `v`." }
317
+ ]
318
+ },
319
+ "json.RawMessage": {
320
+ "contents": [
321
+ { "value": "```go\ntype json.RawMessage []byte\n```\nA raw encoded JSON value. It implements `Marshaler` and `Unmarshaler` and can be used to delay JSON decoding or precompute a JSON encoding." }
322
+ ]
323
+ },
324
+ "http.ListenAndServe": {
325
+ "contents": [
326
+ { "value": "```go\nfunc http.ListenAndServe(addr string, handler http.Handler) error\n```\nListens on the TCP network address `addr` and then calls `Serve` with `handler` to handle requests on incoming connections. If `handler` is `nil`, `DefaultServeMux` is used." }
327
+ ]
328
+ },
329
+ "http.HandleFunc": {
330
+ "contents": [
331
+ { "value": "```go\nfunc http.HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))\n```\nRegisters the handler function for the given pattern in the `DefaultServeMux`." }
332
+ ]
333
+ },
334
+ "http.Get": {
335
+ "contents": [
336
+ { "value": "```go\nfunc http.Get(url string) (*http.Response, error)\n```\nIssues a GET to the specified URL. Caller should close `resp.Body` when done reading from it." }
337
+ ]
338
+ },
339
+ "http.NewRequest": {
340
+ "contents": [
341
+ { "value": "```go\nfunc http.NewRequest(method, url string, body io.Reader) (*http.Request, error)\n```\nReturns a new `Request` given a method, URL, and optional body. Use `http.NewRequestWithContext` to associate a context." }
342
+ ]
343
+ },
344
+ "http.Handler": {
345
+ "contents": [
346
+ { "value": "```go\ntype http.Handler interface {\n ServeHTTP(ResponseWriter, *Request)\n}\n```\nThe `Handler` interface is implemented by objects that can handle HTTP requests. `ServeHTTP` should write reply headers and data to the `ResponseWriter` and then return." }
347
+ ]
348
+ },
349
+ "context.Context": {
350
+ "contents": [
351
+ { "value": "```go\ntype context.Context interface {\n Deadline() (deadline time.Time, ok bool)\n Done() <-chan struct{}\n Err() error\n Value(key any) any\n}\n```\nCarries a deadline, cancellation signal, and request-scoped values across API boundaries and between processes." }
352
+ ]
353
+ },
354
+ "context.Background": {
355
+ "contents": [
356
+ { "value": "```go\nfunc context.Background() context.Context\n```\nReturns a non-nil, empty `Context`. It is never canceled, has no values, and has no deadline. It is typically used by the main function, initialization, and tests, and as the top-level Context for incoming requests." }
357
+ ]
358
+ },
359
+ "context.WithCancel": {
360
+ "contents": [
361
+ { "value": "```go\nfunc context.WithCancel(parent context.Context) (ctx context.Context, cancel context.CancelFunc)\n```\nReturns a copy of parent with a new Done channel. The returned context's Done channel is closed when the returned cancel function is called or when the parent context's Done channel is closed." }
362
+ ]
363
+ },
364
+ "context.WithTimeout": {
365
+ "contents": [
366
+ { "value": "```go\nfunc context.WithTimeout(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc)\n```\nReturns `WithDeadline(parent, time.Now().Add(timeout))`. The cancel function releases resources, so code should call cancel as soon as operations running in this Context complete." }
367
+ ]
368
+ },
369
+ "context.WithValue": {
370
+ "contents": [
371
+ { "value": "```go\nfunc context.WithValue(parent context.Context, key, val any) context.Context\n```\nReturns a copy of parent in which the value associated with `key` is `val`. Use context Values only for request-scoped data that transits processes and API boundaries." }
372
+ ]
373
+ },
374
+ "context.WithDeadline": {
375
+ "contents": [
376
+ { "value": "```go\nfunc context.WithDeadline(parent context.Context, d time.Time) (context.Context, context.CancelFunc)\n```\nReturns a copy of the parent context with the deadline adjusted to be no later than `d`. If the parent's deadline is already earlier, the returned context is semantically equivalent to parent." }
377
+ ]
378
+ },
379
+ "sync.Mutex": {
380
+ "contents": [
381
+ { "value": "```go\ntype sync.Mutex struct { ... }\n```\nA mutual exclusion lock. The zero value for a `Mutex` is an unlocked mutex. A `Mutex` must not be copied after first use. Call `Lock()` and `Unlock()` to acquire and release the lock." }
382
+ ]
383
+ },
384
+ "sync.WaitGroup": {
385
+ "contents": [
386
+ { "value": "```go\ntype sync.WaitGroup struct { ... }\n```\nA `WaitGroup` waits for a collection of goroutines to finish. The main goroutine calls `Add` to set the number of goroutines to wait for. Each goroutine calls `Done` when finished. `Wait` blocks until all goroutines have finished." }
387
+ ]
388
+ },
389
+ "sync.Once": {
390
+ "contents": [
391
+ { "value": "```go\ntype sync.Once struct { ... }\n```\nAn object that will perform exactly one action. Call `Do(f)` to invoke `f` only once, even if called from multiple goroutines." }
392
+ ]
393
+ },
394
+ "sync.Map": {
395
+ "contents": [
396
+ { "value": "```go\ntype sync.Map struct { ... }\n```\nA `Map` is like a Go `map[any]any` but safe for concurrent use by multiple goroutines without additional locking or coordination. Methods: `Store`, `Load`, `Delete`, `Range`, `LoadOrStore`, `LoadAndDelete`." }
397
+ ]
398
+ },
399
+ "sync.RWMutex": {
400
+ "contents": [
401
+ { "value": "```go\ntype sync.RWMutex struct { ... }\n```\nA reader/writer mutual exclusion lock. The lock can be held by an arbitrary number of readers or a single writer. Methods: `RLock`, `RUnlock`, `Lock`, `Unlock`." }
402
+ ]
403
+ },
404
+ "errors.New": {
405
+ "contents": [
406
+ { "value": "```go\nfunc errors.New(text string) error\n```\nReturns an error that formats as the given text. Each call to `New` returns a distinct error value even if the text is identical." }
407
+ ]
408
+ },
409
+ "errors.Is": {
410
+ "contents": [
411
+ { "value": "```go\nfunc errors.Is(err, target error) bool\n```\nReports whether any error in `err`'s tree matches `target`. An error is considered a match if it is equal to the target or if it implements `Is(error) bool` such that `Is(target)` returns true." }
412
+ ]
413
+ },
414
+ "errors.As": {
415
+ "contents": [
416
+ { "value": "```go\nfunc errors.As(err error, target any) bool\n```\nFinds the first error in `err`'s tree that matches `target`, and if one is found, sets `target` to that error value and returns true." }
417
+ ]
418
+ },
419
+ "errors.Join": {
420
+ "contents": [
421
+ { "value": "```go\nfunc errors.Join(errs ...error) error\n```\n(Go 1.20+) Returns an error that wraps the given errors. Any nil error values are discarded. Returns nil if every value in errs is nil." }
422
+ ]
423
+ },
424
+ "errors.Unwrap": {
425
+ "contents": [
426
+ { "value": "```go\nfunc errors.Unwrap(err error) error\n```\nReturns the result of calling the `Unwrap` method on `err`, if `err`'s type contains an `Unwrap` method returning `error`. Otherwise, `Unwrap` returns nil." }
427
+ ]
428
+ },
429
+ "time.Now": {
430
+ "contents": [
431
+ { "value": "```go\nfunc time.Now() time.Time\n```\nReturns the current local time." }
432
+ ]
433
+ },
434
+ "time.Since": {
435
+ "contents": [
436
+ { "value": "```go\nfunc time.Since(t time.Time) time.Duration\n```\nReturns the time elapsed since `t`. It is shorthand for `time.Now().Sub(t)`." }
437
+ ]
438
+ },
439
+ "time.Sleep": {
440
+ "contents": [
441
+ { "value": "```go\nfunc time.Sleep(d time.Duration)\n```\nPauses the current goroutine for at least the duration `d`. A negative or zero duration causes `Sleep` to return immediately." }
442
+ ]
443
+ },
444
+ "time.NewTicker": {
445
+ "contents": [
446
+ { "value": "```go\nfunc time.NewTicker(d time.Duration) *time.Ticker\n```\nReturns a new `Ticker` containing a channel that will send the current time on the channel after each tick. The ticker will adjust the intervals or drop ticks to make up for slow receivers." }
447
+ ]
448
+ },
449
+ "time.After": {
450
+ "contents": [
451
+ { "value": "```go\nfunc time.After(d time.Duration) <-chan time.Time\n```\nWaits for the duration to elapse and then sends the current time on the returned channel. The underlying `Timer` is not recovered by the garbage collector until the timer fires." }
452
+ ]
453
+ },
454
+ "time.Parse": {
455
+ "contents": [
456
+ { "value": "```go\nfunc time.Parse(layout, value string) (time.Time, error)\n```\nParses a formatted string and returns the time value it represents. The layout defines the format by showing how the reference time `Mon Jan 2 15:04:05 -0700 MST 2006` would be represented." }
457
+ ]
458
+ },
459
+ "sort.Slice": {
460
+ "contents": [
461
+ { "value": "```go\nfunc sort.Slice(x any, less func(i, j int) bool)\n```\nSorts the slice `x` given the provided `less` function. The sort is not guaranteed to be stable. `less` reports whether `x[i]` should be ordered before `x[j]`." }
462
+ ]
463
+ },
464
+ "sort.SliceStable": {
465
+ "contents": [
466
+ { "value": "```go\nfunc sort.SliceStable(x any, less func(i, j int) bool)\n```\nSorts the slice `x` using the provided `less` function, keeping equal elements in their original order." }
467
+ ]
468
+ },
469
+ "sort.Search": {
470
+ "contents": [
471
+ { "value": "```go\nfunc sort.Search(n int, f func(int) bool) int\n```\nUses binary search to find the smallest index `i` in `[0, n)` at which `f(i)` is true, assuming `f(i) == true` implies `f(i+1) == true`." }
472
+ ]
473
+ },
474
+ "slices.Sort": {
475
+ "contents": [
476
+ { "value": "```go\nfunc slices.Sort[S ~[]E, E cmp.Ordered](x S)\n```\n(Go 1.21+) Sorts a slice of any ordered type in ascending order. The sort is not guaranteed to be stable." }
477
+ ]
478
+ },
479
+ "slices.Contains": {
480
+ "contents": [
481
+ { "value": "```go\nfunc slices.Contains[S ~[]E, E comparable](s S, v E) bool\n```\n(Go 1.21+) Reports whether `v` is present in `s`." }
482
+ ]
483
+ },
484
+ "slices.Index": {
485
+ "contents": [
486
+ { "value": "```go\nfunc slices.Index[S ~[]E, E comparable](s S, v E) int\n```\n(Go 1.21+) Returns the index of the first occurrence of `v` in `s`, or -1 if not present." }
487
+ ]
488
+ },
489
+ "slices.SortFunc": {
490
+ "contents": [
491
+ { "value": "```go\nfunc slices.SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int)\n```\n(Go 1.21+) Sorts the slice `x` in ascending order as determined by the `cmp` function. The `cmp` function should return a negative number, zero, or a positive number." }
492
+ ]
493
+ },
494
+ "slices.Compact": {
495
+ "contents": [
496
+ { "value": "```go\nfunc slices.Compact[S ~[]E, E comparable](s S) S\n```\n(Go 1.21+) Replaces consecutive runs of equal elements with a single copy. This is like the `uniq` command on a sorted slice. Modifies the contents of the slice `s`." }
497
+ ]
498
+ },
499
+ "maps.Keys": {
500
+ "contents": [
501
+ { "value": "```go\nfunc maps.Keys[M ~map[K]V, K comparable, V any](m M) []K\n```\n(Go 1.21+) Returns the keys of the map `m`. The keys will be in an indeterminate order." }
502
+ ]
503
+ },
504
+ "maps.Values": {
505
+ "contents": [
506
+ { "value": "```go\nfunc maps.Values[M ~map[K]V, K comparable, V any](m M) []V\n```\n(Go 1.21+) Returns the values of the map `m`. The values will be in an indeterminate order." }
507
+ ]
508
+ },
509
+ "maps.Clone": {
510
+ "contents": [
511
+ { "value": "```go\nfunc maps.Clone[M ~map[K]V, K comparable, V any](m M) M\n```\n(Go 1.21+) Returns a copy of `m`. This is a shallow clone: the new keys and values are set using ordinary assignment." }
512
+ ]
513
+ },
514
+ "slog.Info": {
515
+ "contents": [
516
+ { "value": "```go\nfunc slog.Info(msg string, args ...any)\n```\n(Go 1.21+) Logs at `LevelInfo` on the default logger. Arguments are handled in key-value pairs: `slog.Info(\"msg\", \"key1\", val1, \"key2\", val2)`." }
517
+ ]
518
+ },
519
+ "slog.Error": {
520
+ "contents": [
521
+ { "value": "```go\nfunc slog.Error(msg string, args ...any)\n```\n(Go 1.21+) Logs at `LevelError` on the default logger." }
522
+ ]
523
+ },
524
+ "slog.Debug": {
525
+ "contents": [
526
+ { "value": "```go\nfunc slog.Debug(msg string, args ...any)\n```\n(Go 1.21+) Logs at `LevelDebug` on the default logger." }
527
+ ]
528
+ },
529
+ "slog.Warn": {
530
+ "contents": [
531
+ { "value": "```go\nfunc slog.Warn(msg string, args ...any)\n```\n(Go 1.21+) Logs at `LevelWarn` on the default logger." }
532
+ ]
533
+ },
534
+ "slog.With": {
535
+ "contents": [
536
+ { "value": "```go\nfunc slog.With(args ...any) *slog.Logger\n```\n(Go 1.21+) Returns a `Logger` that includes the given attributes in each output operation. Arguments are converted to `Attr` as if by `Logger.Log`." }
537
+ ]
538
+ },
539
+ "log.Println": {
540
+ "contents": [
541
+ { "value": "```go\nfunc log.Println(v ...any)\n```\nCalls `Output` to print to the standard logger. Arguments are handled in the manner of `fmt.Println`. Includes timestamp prefix." }
542
+ ]
543
+ },
544
+ "log.Fatal": {
545
+ "contents": [
546
+ { "value": "```go\nfunc log.Fatal(v ...any)\n```\nEquivalent to `Print()` followed by a call to `os.Exit(1)`." }
547
+ ]
548
+ },
549
+ "log.Printf": {
550
+ "contents": [
551
+ { "value": "```go\nfunc log.Printf(format string, v ...any)\n```\nCalls `fmt.Sprintf` to format its arguments and calls `Output` to print to the standard logger." }
552
+ ]
553
+ },
554
+ "regexp.Compile": {
555
+ "contents": [
556
+ { "value": "```go\nfunc regexp.Compile(expr string) (*regexp.Regexp, error)\n```\nParses a regular expression and returns, if successful, a `Regexp` object that can be used to match against text." }
557
+ ]
558
+ },
559
+ "regexp.MustCompile": {
560
+ "contents": [
561
+ { "value": "```go\nfunc regexp.MustCompile(str string) *regexp.Regexp\n```\nLike `Compile` but panics if the expression cannot be parsed. It simplifies safe initialization of global variables holding compiled regular expressions." }
562
+ ]
563
+ },
564
+ "filepath.Join": {
565
+ "contents": [
566
+ { "value": "```go\nfunc filepath.Join(elem ...string) string\n```\nJoins any number of path elements into a single path, separating them with an OS specific separator. Empty elements are ignored." }
567
+ ]
568
+ },
569
+ "bufio.NewScanner": {
570
+ "contents": [
571
+ { "value": "```go\nfunc bufio.NewScanner(r io.Reader) *bufio.Scanner\n```\nReturns a new `Scanner` to read from `r`. The split function defaults to `ScanLines`. Call `Scan()` to advance, `Text()` to get the current token." }
572
+ ]
573
+ },
574
+ "bufio.NewReader": {
575
+ "contents": [
576
+ { "value": "```go\nfunc bufio.NewReader(rd io.Reader) *bufio.Reader\n```\nReturns a new `Reader` whose buffer has the default size (4096 bytes)." }
577
+ ]
578
+ }
579
+ }
580
+ }