chunk_id large_stringlengths 36 36 | doc_type large_stringclasses 2
values | category large_stringclasses 17
values | document large_stringclasses 50
values | version_raw large_stringclasses 590
values | chunk_index int64 0 262 | text large_stringlengths 11 5.69k | file_path large_stringclasses 882
values |
|---|---|---|---|---|---|---|---|
040bd69c-5629-5deb-ac0e-6785f83c0a5e | docs | golang | golang_errors | go120 | 4 | An error type might provide an As method so it can be treated as if it were a
different error type.
As panics if target is not a non-nil pointer to either a type that implements
error, or to any interface type.
Example [¶](#example-As "Go to Example")
```None
package main
import (
"errors"
"fmt"
"io/fs"
"os"
)
... | large_dataset/raw/docs/golang/errors/errors_go120.md |
49b6ec8c-58f0-5d0d-a731-443647285169 | docs | golang | golang_errors | go120 | 5 | depth-first traversal of its children.
An error is considered to match a target if it is equal to that target or if
it implements a method Is(error) bool such that Is(target) returns true.
An error type might provide an Is method so it can be treated as equivalent
to an existing error. For example, if MyError defines... | large_dataset/raw/docs/golang/errors/errors_go120.md |
60e3ba46-4d70-519e-ad50-e44be35f4abd | docs | golang | golang_errors | go120 | 6 | #### func [Join](https://cs.opensource.google/go/go/+/go1.20:src/errors/join.go;l=13) [¶](#Join "Go to Join") added in go1.20
```None
func Join(errs ...error) error
```
Join returns an error that wraps the given errors.
Any nil error values are discarded.
Join returns nil if errs contains no non-nil values.
The error... | large_dataset/raw/docs/golang/errors/errors_go120.md |
cab12e2a-ea48-5fda-8eb7-cdef526fb391 | docs | golang | golang_errors | go120 | 7 | #### func [New](https://cs.opensource.google/go/go/+/go1.20:src/errors/errors.go;l=61) [¶](#New "Go to New")
```None
func New(text string) error
```
New returns an error that formats as the given text.
Each call to New returns a distinct error value even if the text is identical.
Example [¶](#example-New "Go to Exam... | large_dataset/raw/docs/golang/errors/errors_go120.md |
62717bc4-d304-5e00-b33a-0ad4488543b8 | docs | golang | golang_errors | go120 | 8 |
#### func [Unwrap](https://cs.opensource.google/go/go/+/go1.20:src/errors/wrap.go;l=16) [¶](#Unwrap "Go to Unwrap") added in go1.13
```None
func Unwrap(err error) error
```
Unwrap returns the result of calling the Unwrap method on err, if err's
type contains an Unwrap method returning error.
Otherwise, Unwrap return... | large_dataset/raw/docs/golang/errors/errors_go120.md |
8ef0b913-4f48-52c4-b4fd-afb55a998a62 | docs | golang | golang_errors | go1210 | 0 | # Golang - errors
Source: https://pkg.go.dev/errors@go1.21.0
Version: go1.21.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package errors implements functions to manipulate errors.
The [New](#New) function creates errors whose only content is ... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
50cc0d23-bd42-501a-bba4-636d06b5fcb1 | docs | golang | golang_errors | go1210 | 1 | functions inspect an error's tree by examining first the error
itself followed by the tree of each of its children in turn
(pre-order, depth-first traversal).
Is examines the tree of its first argument looking for an error that
matches the second. It reports whether it finds a match. It should be
used in preference to... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
6ecbca0e-3596-53e2-b254-02963f31cbdd | docs | golang | golang_errors | go1210 | 2 | because the former will succeed if err wraps an [\*io/fs.PathError](/io/fs#PathError).
Example [¶](#example-package "Go to Example")
```None
package main
import (
"fmt"
"time"
)
// MyError is an error implementation that includes a time and message.
type MyError struct {
When time.Time
What string
}
func (e My... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
324fa9d9-80e8-5a3a-ac2e-55c12d4db6f2 | docs | golang | golang_errors | go1210 | 3 | ### Examples [¶](#pkg-examples "Go to Examples")
* [Package](#example-package)
* [As](#example-As)
* [Is](#example-Is)
* [Join](#example-Join)
* [New](#example-New)
* [New (Errorf)](#example-New-Errorf)
* [Unwrap](#example-Unwrap)
### Constants [¶](#pkg-constants "Go to Constants")
This section is empty.
### Variab... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
c07817d9-081d-57ac-b3df-fcc14d044196 | docs | golang | golang_errors | go1210 | 4 | Functions and methods should document the cases in which an error
wrapping this will be returned.
### Functions [¶](#pkg-functions "Go to Functions")
#### func [As](https://cs.opensource.google/go/go/+/go1.21.0:src/errors/wrap.go;l=93) [¶](#As "Go to As") added in go1.13
```None
func As(err error, target any) bool
`... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
2ff9ae2d-4f41-5975-a523-0beb9397a599 | docs | golang | golang_errors | go1210 | 5 | different error type.
As panics if target is not a non-nil pointer to either a type that implements
error, or to any interface type.
Example [¶](#example-As "Go to Example")
```None
package main
import (
"errors"
"fmt"
"io/fs"
"os"
)
func main() {
if _, err := os.Open("non-existing"); err != nil {
var pathE... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
70b56a99-1fd4-5817-9344-6840f7bdad06 | docs | golang | golang_errors | go1210 | 6 | An error is considered to match a target if it is equal to that target or if
it implements a method Is(error) bool such that Is(target) returns true.
An error type might provide an Is method so it can be treated as equivalent
to an existing error. For example, if MyError defines
```None
func (m MyError) Is(target err... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
efce9489-242a-5e12-be8c-46f7452e7b90 | docs | golang | golang_errors | go1210 | 7 | #### func [Join](https://cs.opensource.google/go/go/+/go1.21.0:src/errors/join.go;l=15) [¶](#Join "Go to Join") added in go1.20
```None
func Join(errs ...error) error
```
Join returns an error that wraps the given errors.
Any nil error values are discarded.
Join returns nil if every value in errs is nil.
The error fo... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
f9ec8abe-8d0c-5423-a91d-e7606b9d83c9 | docs | golang | golang_errors | go1210 | 8 | #### func [New](https://cs.opensource.google/go/go/+/go1.21.0:src/errors/errors.go;l=61) [¶](#New "Go to New")
```None
func New(text string) error
```
New returns an error that formats as the given text.
Each call to New returns a distinct error value even if the text is identical.
Example [¶](#example-New "Go to Ex... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
727889d4-ff58-51a9-afb4-dec34fd4f089 | docs | golang | golang_errors | go1210 | 9 | Run
#### func [Unwrap](https://cs.opensource.google/go/go/+/go1.21.0:src/errors/wrap.go;l=17) [¶](#Unwrap "Go to Unwrap") added in go1.13
```None
func Unwrap(err error) error
```
Unwrap returns the result of calling the Unwrap method on err, if err's
type contains an Unwrap method returning error.
Otherwise, Unwrap ... | large_dataset/raw/docs/golang/errors/errors_go1210.md |
d3486d10-ecf0-5f5b-b384-9aed9bd76192 | docs | golang | golang_errors | go1220 | 0 | # Golang - errors
Source: https://pkg.go.dev/errors@go1.22.0
Version: go1.22.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package errors implements functions to manipulate errors.
The [New](#New) function creates errors whose only content is ... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
bf21eed8-4ba1-522b-bf17-a2f40752c8ff | docs | golang | golang_errors | go1220 | 1 | functions inspect an error's tree by examining first the error
itself followed by the tree of each of its children in turn
(pre-order, depth-first traversal).
[Is](#Is) examines the tree of its first argument looking for an error that
matches the second. It reports whether it finds a match. It should be
used in prefer... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
2ae8bb8f-ddf5-5f99-a6bf-7c3358816da4 | docs | golang | golang_errors | go1220 | 2 | because the former will succeed if err wraps an [\*io/fs.PathError](/io/fs#PathError).
Example [¶](#example-package "Go to Example")
```None
package main
import (
"fmt"
"time"
)
// MyError is an error implementation that includes a time and message.
type MyError struct {
When time.Time
What string
}
func (e My... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
bfe55e90-366f-5398-a544-1c1b3b707126 | docs | golang | golang_errors | go1220 | 3 | ### Examples [¶](#pkg-examples "Go to Examples")
* [Package](#example-package)
* [As](#example-As)
* [Is](#example-Is)
* [Join](#example-Join)
* [New](#example-New)
* [New (Errorf)](#example-New-Errorf)
* [Unwrap](#example-Unwrap)
### Constants [¶](#pkg-constants "Go to Constants")
This section is empty.
### Variab... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
285679a7-0070-55e0-8c84-520c0b3991c8 | docs | golang | golang_errors | go1220 | 4 | Functions and methods should document the cases in which an error
wrapping this will be returned.
### Functions [¶](#pkg-functions "Go to Functions")
#### func [As](https://cs.opensource.google/go/go/+/go1.22.0:src/errors/wrap.go;l=97) [¶](#As "Go to As") added in go1.13
```None
func As(err error, target any) bool
`... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
e05aadb1-e36a-5a6d-89a2-345427595c7d | docs | golang | golang_errors | go1220 | 5 | An error type might provide an As method so it can be treated as if it were a
different error type.
As panics if target is not a non-nil pointer to either a type that implements
error, or to any interface type.
Example [¶](#example-As "Go to Example")
```None
package main
import (
"errors"
"fmt"
"io/fs"
"os"
)
... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
d86b24a8-779d-5d6a-9b8a-8108d7e2ba33 | docs | golang | golang_errors | go1220 | 6 | errors, Is examines err followed by a depth-first traversal of its children.
An error is considered to match a target if it is equal to that target or if
it implements a method Is(error) bool such that Is(target) returns true.
An error type might provide an Is method so it can be treated as equivalent
to an existing ... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
adc12266-a751-59d4-8b35-9390840cd7d5 | docs | golang | golang_errors | go1220 | 7 | Format
Run
#### func [Join](https://cs.opensource.google/go/go/+/go1.22.0:src/errors/join.go;l=19) [¶](#Join "Go to Join") added in go1.20
```None
func Join(errs ...error) error
```
Join returns an error that wraps the given errors.
Any nil error values are discarded.
Join returns nil if every value in errs is nil.
... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
c66f9ef6-52bc-54e0-8703-dbb54064a74d | docs | golang | golang_errors | go1220 | 8 | #### func [New](https://cs.opensource.google/go/go/+/go1.22.0:src/errors/errors.go;l=61) [¶](#New "Go to New")
```None
func New(text string) error
```
New returns an error that formats as the given text.
Each call to New returns a distinct error value even if the text is identical.
Example [¶](#example-New "Go to Ex... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
97a296b1-03f5-5426-bd44-c65b7d5785b0 | docs | golang | golang_errors | go1220 | 9 | Run
#### func [Unwrap](https://cs.opensource.google/go/go/+/go1.22.0:src/errors/wrap.go;l=17) [¶](#Unwrap "Go to Unwrap") added in go1.13
```None
func Unwrap(err error) error
```
Unwrap returns the result of calling the Unwrap method on err, if err's
type contains an Unwrap method returning error.
Otherwise, Unwrap ... | large_dataset/raw/docs/golang/errors/errors_go1220.md |
c7777950-ff69-5ef0-ab8c-99d4fcc6008a | docs | golang | golang_errors | go1230 | 0 | # Golang - errors
Source: https://pkg.go.dev/errors@go1.23.0
Version: go1.23.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package errors implements functions to manipulate errors.
The [New](#New) function creates errors whose only content is ... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
0b9be39b-70f0-5015-a2a4-2cadc433401e | docs | golang | golang_errors | go1230 | 1 | functions inspect an error's tree by examining first the error
itself followed by the tree of each of its children in turn
(pre-order, depth-first traversal).
[Is](#Is) examines the tree of its first argument looking for an error that
matches the second. It reports whether it finds a match. It should be
used in prefer... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
d7229e69-dbe3-5de6-a5fd-9089614706a2 | docs | golang | golang_errors | go1230 | 2 | because the former will succeed if err wraps an [\*io/fs.PathError](/io/fs#PathError).
Example [¶](#example-package "Go to Example")
```None
package main
import (
"fmt"
"time"
)
// MyError is an error implementation that includes a time and message.
type MyError struct {
When time.Time
What string
}
func (e My... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
c5b07194-6da7-5ba4-95d9-e09ac0234673 | docs | golang | golang_errors | go1230 | 3 | ### Examples [¶](#pkg-examples "Go to Examples")
* [Package](#example-package)
* [As](#example-As)
* [Is](#example-Is)
* [Join](#example-Join)
* [New](#example-New)
* [New (Errorf)](#example-New-Errorf)
* [Unwrap](#example-Unwrap)
### Constants [¶](#pkg-constants "Go to Constants")
This section is empty.
### Variab... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
79277fdb-785b-5ab1-bc47-355be1661f4f | docs | golang | golang_errors | go1230 | 4 | Functions and methods should document the cases in which an error
wrapping this will be returned.
### Functions [¶](#pkg-functions "Go to Functions")
#### func [As](https://cs.opensource.google/go/go/+/go1.23.0:src/errors/wrap.go;l=97) [¶](#As "Go to As") added in go1.13
```None
func As(err error, target any) bool
`... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
adf3fd38-8749-5cf2-92d5-e7f3a009f45e | docs | golang | golang_errors | go1230 | 5 | An error type might provide an As method so it can be treated as if it were a
different error type.
As panics if target is not a non-nil pointer to either a type that implements
error, or to any interface type.
Example [¶](#example-As "Go to Example")
```None
package main
import (
"errors"
"fmt"
"io/fs"
"os"
)
... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
4ccdb2df-d6ab-5874-bae5-f2850607a4d1 | docs | golang | golang_errors | go1230 | 6 | errors, Is examines err followed by a depth-first traversal of its children.
An error is considered to match a target if it is equal to that target or if
it implements a method Is(error) bool such that Is(target) returns true.
An error type might provide an Is method so it can be treated as equivalent
to an existing ... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
92fde9cd-6752-5b67-8828-941776330627 | docs | golang | golang_errors | go1230 | 7 | Format
Run
#### func [Join](https://cs.opensource.google/go/go/+/go1.23.0:src/errors/join.go;l=19) [¶](#Join "Go to Join") added in go1.20
```None
func Join(errs ...error) error
```
Join returns an error that wraps the given errors.
Any nil error values are discarded.
Join returns nil if every value in errs is nil.
... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
741306b1-9957-596c-be24-96ae4e91b4e9 | docs | golang | golang_errors | go1230 | 8 | #### func [New](https://cs.opensource.google/go/go/+/go1.23.0:src/errors/errors.go;l=61) [¶](#New "Go to New")
```None
func New(text string) error
```
New returns an error that formats as the given text.
Each call to New returns a distinct error value even if the text is identical.
Example [¶](#example-New "Go to Ex... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
4bf19d7d-708c-55d7-a185-7e25e1bed2c2 | docs | golang | golang_errors | go1230 | 9 | Run
#### func [Unwrap](https://cs.opensource.google/go/go/+/go1.23.0:src/errors/wrap.go;l=17) [¶](#Unwrap "Go to Unwrap") added in go1.13
```None
func Unwrap(err error) error
```
Unwrap returns the result of calling the Unwrap method on err, if err's
type contains an Unwrap method returning error.
Otherwise, Unwrap ... | large_dataset/raw/docs/golang/errors/errors_go1230.md |
c0590284-a53e-5197-bd96-dc70b3cfc21b | docs | golang | golang_errors | go1240 | 0 | # Golang - errors
Source: https://pkg.go.dev/errors@go1.24.0
Version: go1.24.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package errors implements functions to manipulate errors.
The [New](#New) function creates errors whose only content is ... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
af2c2cce-70c0-56b4-9292-2d10ccdf56a8 | docs | golang | golang_errors | go1240 | 1 | functions inspect an error's tree by examining first the error
itself followed by the tree of each of its children in turn
(pre-order, depth-first traversal).
See <https://go.dev/blog/go1.13-errors> for a deeper discussion of the
philosophy of wrapping and when to wrap.
[Is](#Is) examines the tree of its first argume... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
92de422c-8607-51a0-b23e-72374bc115fb | docs | golang | golang_errors | go1240 | 2 | if perr, ok := err.(*fs.PathError); ok {
fmt.Println(perr.Path)
}
```
because the former will succeed if err wraps an [\*io/fs.PathError](/io/fs#PathError).
Example [¶](#example-package "Go to Example")
```None
package main
import (
"fmt"
"time"
)
// MyError is an error implementation that includes a time and m... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
228071a5-f36d-5faf-96a3-a1c70ee1e06b | docs | golang | golang_errors | go1240 | 3 | * [func Unwrap(err error) error](#Unwrap)
### Examples [¶](#pkg-examples "Go to Examples")
* [Package](#example-package)
* [As](#example-As)
* [Is](#example-Is)
* [Join](#example-Join)
* [New](#example-New)
* [New (Errorf)](#example-New-Errorf)
* [Unwrap](#example-Unwrap)
### Constants [¶](#pkg-constants "Go to Cons... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
fc534c35-5c4d-5e47-b25e-c9557dfffb65 | docs | golang | golang_errors | go1240 | 4 | either by directly wrapping ErrUnsupported or by implementing an [Is](#Is) method.
Functions and methods should document the cases in which an error
wrapping this will be returned.
### Functions [¶](#pkg-functions "Go to Functions")
#### func [As](https://cs.opensource.google/go/go/+/go1.24.0:src/errors/wrap.go;l=97... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
eefbc266-65a2-520e-9084-21125e153d80 | docs | golang | golang_errors | go1240 | 5 | As(target) returns true. In the latter case, the As method is responsible for
setting target.
An error type might provide an As method so it can be treated as if it were a
different error type.
As panics if target is not a non-nil pointer to either a type that implements
error, or to any interface type.
Example [¶](... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
f4cb72b7-be87-5b61-bcc8-905d27719ad0 | docs | golang | golang_errors | go1240 | 6 | calling its Unwrap() error or Unwrap() []error method. When err wraps multiple
errors, Is examines err followed by a depth-first traversal of its children.
An error is considered to match a target if it is equal to that target or if
it implements a method Is(error) bool such that Is(target) returns true.
An error typ... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
8fff6c7d-aa3b-5785-995c-ebd0bfd66823 | docs | golang | golang_errors | go1240 | 7 | fmt.Println(err)
}
}
}
```
```None
Output:
file does not exist
```
Share
Format
Run
#### func [Join](https://cs.opensource.google/go/go/+/go1.24.0:src/errors/join.go;l=19) [¶](#Join "Go to Join") added in go1.20
```None
func Join(errs ...error) error
```
Join returns an error that wraps the given errors.
A... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
212f80f0-c2e2-59ec-b8a2-b85b3257df07 | docs | golang | golang_errors | go1240 | 8 |
Share
Format
Run
#### func [New](https://cs.opensource.google/go/go/+/go1.24.0:src/errors/errors.go;l=64) [¶](#New "Go to New")
```None
func New(text string) error
```
New returns an error that formats as the given text.
Each call to New returns a distinct error value even if the text is identical.
Example [¶](#ex... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
80d2ff0a-796b-592c-9257-4bf8eabd58a4 | docs | golang | golang_errors | go1240 | 9 | ```
Share
Format
Run
#### func [Unwrap](https://cs.opensource.google/go/go/+/go1.24.0:src/errors/wrap.go;l=17) [¶](#Unwrap "Go to Unwrap") added in go1.13
```None
func Unwrap(err error) error
```
Unwrap returns the result of calling the Unwrap method on err, if err's
type contains an Unwrap method returning error.
... | large_dataset/raw/docs/golang/errors/errors_go1240.md |
62b3450d-0996-52b4-80e8-0261b005dcfd | docs | golang | golang_hash | go118 | 0 | # Golang - hash
Source: https://pkg.go.dev/hash@go1.18
Version: go1.18
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package hash provides interfaces for hash functions.
Example (BinaryMarshaler) [¶](#example-package-BinaryMarshaler "Go to Examp... | large_dataset/raw/docs/golang/hash/hash_go118.md |
0de3b69c-ecf3-5c68-8217-2cbc6426ebbf | docs | golang | golang_hash | go118 | 1 | if err := unmarshaler.UnmarshalBinary(state); err != nil {
log.Fatal("unable to unmarshal hash:", err)
}
first.Write([]byte(input2))
second.Write([]byte(input2))
fmt.Printf("%x\n", first.Sum(nil))
fmt.Println(bytes.Equal(first.Sum(nil), second.Sum(nil)))
}
```
```None
Output:
57d51a066f3a39942649cd9a76c77e9... | large_dataset/raw/docs/golang/hash/hash_go118.md |
b6d246a1-bec0-5e6f-86b9-029b4b398f1c | docs | golang | golang_hash | go118 | 2 | ### Types [¶](#pkg-types "Go to Types")
#### type [Hash](https://cs.opensource.google/go/go/+/go1.18:src/hash/hash.go;l=26) [¶](#Hash "Go to Hash")
```None
type Hash interface {
// Write (via the embedded io.Writer interface) adds more data to the running hash.
// It never returns an error.
io.Writer
// Sum appe... | large_dataset/raw/docs/golang/hash/hash_go118.md |
363e834a-f202-5d04-b464-5fea9884e2ef | docs | golang | golang_hash | go118 | 3 | encoding.BinaryUnmarshaler interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for additional processing
later, without having to re-write the data previously written to the hash.
The hash state may contain portions of the input in its original form,
which users are expected to h... | large_dataset/raw/docs/golang/hash/hash_go118.md |
a6b6e677-896d-56f3-a097-0f933f55e762 | docs | golang | golang_hash | go118 | 4 | #### type [Hash64](https://cs.opensource.google/go/go/+/go1.18:src/hash/hash.go;l=55) [¶](#Hash64 "Go to Hash64")
```None
type Hash64 interface {
Hash
Sum64() uint64
}
```
Hash64 is the common interface implemented by all 64-bit hash functions.
| large_dataset/raw/docs/golang/hash/hash_go118.md |
bd28ee22-55c4-5c2c-a7be-d49db008c256 | docs | golang | golang_hash | go119 | 0 | # Golang - hash
Source: https://pkg.go.dev/hash@go1.19
Version: go1.19
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package hash provides interfaces for hash functions.
Example (BinaryMarshaler) [¶](#example-package-BinaryMarshaler "Go to Examp... | large_dataset/raw/docs/golang/hash/hash_go119.md |
cf015242-e116-5dee-aab8-d110547589c1 | docs | golang | golang_hash | go119 | 1 | if err := unmarshaler.UnmarshalBinary(state); err != nil {
log.Fatal("unable to unmarshal hash:", err)
}
first.Write([]byte(input2))
second.Write([]byte(input2))
fmt.Printf("%x\n", first.Sum(nil))
fmt.Println(bytes.Equal(first.Sum(nil), second.Sum(nil)))
}
```
```None
Output:
57d51a066f3a39942649cd9a76c77e9... | large_dataset/raw/docs/golang/hash/hash_go119.md |
53d6f6eb-e528-5c09-ad8e-76ee12835b29 | docs | golang | golang_hash | go119 | 2 | ### Types [¶](#pkg-types "Go to Types")
#### type [Hash](https://cs.opensource.google/go/go/+/go1.19:src/hash/hash.go;l=26) [¶](#Hash "Go to Hash")
```None
type Hash interface {
// Write (via the embedded io.Writer interface) adds more data to the running hash.
// It never returns an error.
io.Writer
// Sum appe... | large_dataset/raw/docs/golang/hash/hash_go119.md |
9933262b-9858-5a70-9a2f-c9ce1e559acf | docs | golang | golang_hash | go119 | 3 | encoding.BinaryUnmarshaler interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for additional processing
later, without having to re-write the data previously written to the hash.
The hash state may contain portions of the input in its original form,
which users are expected to h... | large_dataset/raw/docs/golang/hash/hash_go119.md |
6d5c8507-2a7a-59d8-abf2-7931c16f3584 | docs | golang | golang_hash | go119 | 4 | #### type [Hash64](https://cs.opensource.google/go/go/+/go1.19:src/hash/hash.go;l=55) [¶](#Hash64 "Go to Hash64")
```None
type Hash64 interface {
Hash
Sum64() uint64
}
```
Hash64 is the common interface implemented by all 64-bit hash functions.
| large_dataset/raw/docs/golang/hash/hash_go119.md |
59c1a484-49c9-5a87-ae87-592d3c8abe5d | docs | golang | golang_hash | go120 | 0 | # Golang - hash
Source: https://pkg.go.dev/hash@go1.20
Version: go1.20
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package hash provides interfaces for hash functions.
Example (BinaryMarshaler) [¶](#example-package-BinaryMarshaler "Go to Examp... | large_dataset/raw/docs/golang/hash/hash_go120.md |
80f55131-3b08-5e53-a74b-9e32bb86e114 | docs | golang | golang_hash | go120 | 1 | if err := unmarshaler.UnmarshalBinary(state); err != nil {
log.Fatal("unable to unmarshal hash:", err)
}
first.Write([]byte(input2))
second.Write([]byte(input2))
fmt.Printf("%x\n", first.Sum(nil))
fmt.Println(bytes.Equal(first.Sum(nil), second.Sum(nil)))
}
```
```None
Output:
57d51a066f3a39942649cd9a76c77e9... | large_dataset/raw/docs/golang/hash/hash_go120.md |
44e2ea57-d61b-5d6f-ba12-fea266f067e8 | docs | golang | golang_hash | go120 | 2 | ### Types [¶](#pkg-types "Go to Types")
#### type [Hash](https://cs.opensource.google/go/go/+/go1.20:src/hash/hash.go;l=26) [¶](#Hash "Go to Hash")
```None
type Hash interface {
// Write (via the embedded io.Writer interface) adds more data to the running hash.
// It never returns an error.
io.Writer
// Sum appe... | large_dataset/raw/docs/golang/hash/hash_go120.md |
166e71f0-1ae9-515c-a393-0f38936566aa | docs | golang | golang_hash | go120 | 3 | encoding.BinaryUnmarshaler interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for additional processing
later, without having to re-write the data previously written to the hash.
The hash state may contain portions of the input in its original form,
which users are expected to h... | large_dataset/raw/docs/golang/hash/hash_go120.md |
8051028b-3c2a-5245-8ab7-32f683f817e8 | docs | golang | golang_hash | go120 | 4 | #### type [Hash64](https://cs.opensource.google/go/go/+/go1.20:src/hash/hash.go;l=55) [¶](#Hash64 "Go to Hash64")
```None
type Hash64 interface {
Hash
Sum64() uint64
}
```
Hash64 is the common interface implemented by all 64-bit hash functions.
| large_dataset/raw/docs/golang/hash/hash_go120.md |
9aa1f40a-fdc8-5bbf-b944-072a993c24e3 | docs | golang | golang_hash | go1210 | 0 | # Golang - hash
Source: https://pkg.go.dev/hash@go1.21.0
Version: go1.21.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package hash provides interfaces for hash functions.
Example (BinaryMarshaler) [¶](#example-package-BinaryMarshaler "Go to E... | large_dataset/raw/docs/golang/hash/hash_go1210.md |
0bb59d1d-1c35-54ae-9c72-317bf1962e36 | docs | golang | golang_hash | go1210 | 1 | if err := unmarshaler.UnmarshalBinary(state); err != nil {
log.Fatal("unable to unmarshal hash:", err)
}
first.Write([]byte(input2))
second.Write([]byte(input2))
fmt.Printf("%x\n", first.Sum(nil))
fmt.Println(bytes.Equal(first.Sum(nil), second.Sum(nil)))
}
```
```None
Output:
57d51a066f3a39942649cd9a76c77e9... | large_dataset/raw/docs/golang/hash/hash_go1210.md |
3c8b0bc2-cdfb-571e-9787-f961efbe0687 | docs | golang | golang_hash | go1210 | 2 | ### Types [¶](#pkg-types "Go to Types")
#### type [Hash](https://cs.opensource.google/go/go/+/go1.21.0:src/hash/hash.go;l=26) [¶](#Hash "Go to Hash")
```None
type Hash interface {
// Write (via the embedded io.Writer interface) adds more data to the running hash.
// It never returns an error.
io.Writer
// Sum ap... | large_dataset/raw/docs/golang/hash/hash_go1210.md |
9b733676-8203-54c6-9904-390ce4e9bbdc | docs | golang | golang_hash | go1210 | 3 | encoding.BinaryUnmarshaler interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for additional processing
later, without having to re-write the data previously written to the hash.
The hash state may contain portions of the input in its original form,
which users are expected to h... | large_dataset/raw/docs/golang/hash/hash_go1210.md |
7325023a-2152-5bb6-bb84-8860efb5eeff | docs | golang | golang_hash | go1210 | 4 | #### type [Hash64](https://cs.opensource.google/go/go/+/go1.21.0:src/hash/hash.go;l=55) [¶](#Hash64 "Go to Hash64")
```None
type Hash64 interface {
Hash
Sum64() uint64
}
```
Hash64 is the common interface implemented by all 64-bit hash functions.
| large_dataset/raw/docs/golang/hash/hash_go1210.md |
708277b9-7b4c-5683-aa38-11fdc06c98cd | docs | golang | golang_hash | go1220 | 0 | # Golang - hash
Source: https://pkg.go.dev/hash@go1.22.0
Version: go1.22.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package hash provides interfaces for hash functions.
Example (BinaryMarshaler) [¶](#example-package-BinaryMarshaler "Go to E... | large_dataset/raw/docs/golang/hash/hash_go1220.md |
1ea1cee6-85e5-5f9f-a35b-d6b629224be6 | docs | golang | golang_hash | go1220 | 1 | if err := unmarshaler.UnmarshalBinary(state); err != nil {
log.Fatal("unable to unmarshal hash:", err)
}
first.Write([]byte(input2))
second.Write([]byte(input2))
fmt.Printf("%x\n", first.Sum(nil))
fmt.Println(bytes.Equal(first.Sum(nil), second.Sum(nil)))
}
```
```None
Output:
57d51a066f3a39942649cd9a76c77e9... | large_dataset/raw/docs/golang/hash/hash_go1220.md |
363e2f61-e71c-506d-a3e1-80c39ec062d1 | docs | golang | golang_hash | go1220 | 2 | ### Types [¶](#pkg-types "Go to Types")
#### type [Hash](https://cs.opensource.google/go/go/+/go1.22.0:src/hash/hash.go;l=26) [¶](#Hash "Go to Hash")
```None
type Hash interface {
// Write (via the embedded io.Writer interface) adds more data to the running hash.
// It never returns an error.
io.Writer
// Sum ap... | large_dataset/raw/docs/golang/hash/hash_go1220.md |
775bb225-8e05-5bfd-bc4f-f91162dd3e5e | docs | golang | golang_hash | go1220 | 3 | [crypto/sha256](/crypto/sha256)) implement the [encoding.BinaryMarshaler](/encoding#BinaryMarshaler) and
[encoding.BinaryUnmarshaler](/encoding#BinaryUnmarshaler) interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for additional processing
later, without having to re-write the d... | large_dataset/raw/docs/golang/hash/hash_go1220.md |
11748506-316e-5dce-9044-a06b4dfbe1f3 | docs | golang | golang_hash | go1220 | 4 | #### type [Hash32](https://cs.opensource.google/go/go/+/go1.22.0:src/hash/hash.go;l=49) [¶](#Hash32 "Go to Hash32")
```None
type Hash32 interface {
Hash
Sum32() uint32
}
```
Hash32 is the common interface implemented by all 32-bit hash functions.
#### type [Hash64](https://cs.opensource.google/go/go/+/go1.22.0:src... | large_dataset/raw/docs/golang/hash/hash_go1220.md |
884a33dd-ab32-51a1-83f4-acc2b1901abd | docs | golang | golang_hash | go1230 | 0 | # Golang - hash
Source: https://pkg.go.dev/hash@go1.23.0
Version: go1.23.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package hash provides interfaces for hash functions.
Example (BinaryMarshaler) [¶](#example-package-BinaryMarshaler "Go to E... | large_dataset/raw/docs/golang/hash/hash_go1230.md |
bcb96344-577b-5534-8a36-1ae77e98113a | docs | golang | golang_hash | go1230 | 1 | if err := unmarshaler.UnmarshalBinary(state); err != nil {
log.Fatal("unable to unmarshal hash:", err)
}
first.Write([]byte(input2))
second.Write([]byte(input2))
fmt.Printf("%x\n", first.Sum(nil))
fmt.Println(bytes.Equal(first.Sum(nil), second.Sum(nil)))
}
```
```None
Output:
57d51a066f3a39942649cd9a76c77e9... | large_dataset/raw/docs/golang/hash/hash_go1230.md |
9feba7c9-e879-57b9-974a-4cfa79c01352 | docs | golang | golang_hash | go1230 | 2 | ### Types [¶](#pkg-types "Go to Types")
#### type [Hash](https://cs.opensource.google/go/go/+/go1.23.0:src/hash/hash.go;l=26) [¶](#Hash "Go to Hash")
```None
type Hash interface {
// Write (via the embedded io.Writer interface) adds more data to the running hash.
// It never returns an error.
io.Writer
// Sum ap... | large_dataset/raw/docs/golang/hash/hash_go1230.md |
bc8b71cf-f59c-5f99-bcd6-452a624654f3 | docs | golang | golang_hash | go1230 | 3 | [crypto/sha256](/crypto/sha256)) implement the [encoding.BinaryMarshaler](/encoding#BinaryMarshaler) and
[encoding.BinaryUnmarshaler](/encoding#BinaryUnmarshaler) interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for additional processing
later, without having to re-write the d... | large_dataset/raw/docs/golang/hash/hash_go1230.md |
021de4d4-67dc-5f2c-9577-5c2492150665 | docs | golang | golang_hash | go1230 | 4 | #### type [Hash32](https://cs.opensource.google/go/go/+/go1.23.0:src/hash/hash.go;l=49) [¶](#Hash32 "Go to Hash32")
```None
type Hash32 interface {
Hash
Sum32() uint32
}
```
Hash32 is the common interface implemented by all 32-bit hash functions.
#### type [Hash64](https://cs.opensource.google/go/go/+/go1.23.0:src... | large_dataset/raw/docs/golang/hash/hash_go1230.md |
9bdc5cf0-78c0-537f-9e5b-cb3ef7cb1eb5 | docs | golang | golang_hash | go1240 | 0 | # Golang - hash
Source: https://pkg.go.dev/hash@go1.24.0
Version: go1.24.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package hash provides interfaces for hash functions.
Example (BinaryMarshaler) [¶](#example-package-BinaryMarshaler "Go to E... | large_dataset/raw/docs/golang/hash/hash_go1240.md |
918a09c7-7d55-58f2-8ddb-2ce6f9dbc1b6 | docs | golang | golang_hash | go1240 | 1 | if err := unmarshaler.UnmarshalBinary(state); err != nil {
log.Fatal("unable to unmarshal hash:", err)
}
first.Write([]byte(input2))
second.Write([]byte(input2))
fmt.Printf("%x\n", first.Sum(nil))
fmt.Println(bytes.Equal(first.Sum(nil), second.Sum(nil)))
}
```
```None
Output:
57d51a066f3a39942649cd9a76c77e9... | large_dataset/raw/docs/golang/hash/hash_go1240.md |
7f557c72-8b42-518f-b015-1693bcc263ce | docs | golang | golang_hash | go1240 | 2 | ### Types [¶](#pkg-types "Go to Types")
#### type [Hash](https://cs.opensource.google/go/go/+/go1.24.0:src/hash/hash.go;l=26) [¶](#Hash "Go to Hash")
```None
type Hash interface {
// Write (via the embedded io.Writer interface) adds more data to the running hash.
// It never returns an error.
io.Writer
// Sum ap... | large_dataset/raw/docs/golang/hash/hash_go1240.md |
8e9113b8-c810-5c9f-9672-39ec1455917e | docs | golang | golang_hash | go1240 | 3 | [crypto/sha256](/crypto/sha256)) implement the [encoding.BinaryMarshaler](/encoding#BinaryMarshaler), [encoding.BinaryAppender](/encoding#BinaryAppender)
and [encoding.BinaryUnmarshaler](/encoding#BinaryUnmarshaler) interfaces. Marshaling a hash implementation
allows its internal state to be saved and used for addition... | large_dataset/raw/docs/golang/hash/hash_go1240.md |
f9a06e14-018b-52e2-a39e-68209843a0f6 | docs | golang | golang_hash | go1240 | 4 | #### type [Hash32](https://cs.opensource.google/go/go/+/go1.24.0:src/hash/hash.go;l=49) [¶](#Hash32 "Go to Hash32")
```None
type Hash32 interface {
Hash
Sum32() uint32
}
```
Hash32 is the common interface implemented by all 32-bit hash functions.
#### type [Hash64](https://cs.opensource.google/go/go/+/go1.24.0:src... | large_dataset/raw/docs/golang/hash/hash_go1240.md |
ef748ee0-2762-5fff-b7fe-388bf3843584 | docs | golang | golang_maps | go1210 | 0 | # Golang - maps
Source: https://pkg.go.dev/maps@go1.21.0
Version: go1.21.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package maps defines various functions useful with maps of any type.
### Index [¶](#pkg-index "Go to Index")
* [func Clone[... | large_dataset/raw/docs/golang/maps/maps_go1210.md |
fdf6d94f-3c0a-5a01-b182-36b39e12e003 | docs | golang | golang_maps | go1210 | 1 | ### Constants [¶](#pkg-constants "Go to Constants")
This section is empty.
### Variables [¶](#pkg-variables "Go to Variables")
This section is empty.
### Functions [¶](#pkg-functions "Go to Functions")
#### func [Clone](https://cs.opensource.google/go/go/+/go1.21.0:src/maps/maps.go;l=41) [¶](#Clone "Go to Clone")
... | large_dataset/raw/docs/golang/maps/maps_go1210.md |
c5ac9bd6-8c8b-5f6f-b091-72f5b5a506bf | docs | golang | golang_maps | go1210 | 2 | #### func [DeleteFunc](https://cs.opensource.google/go/go/+/go1.21.0:src/maps/maps.go;l=60) [¶](#DeleteFunc "Go to DeleteFunc")
```None
func DeleteFunc[M ~map[K]V, K comparable, V any](m M, del func(K, V) bool)
```
DeleteFunc deletes any key/value pairs from m for which del returns true.
Example [¶](#example-DeleteF... | large_dataset/raw/docs/golang/maps/maps_go1210.md |
389bfbf7-15ad-5149-97f3-819422e67d18 | docs | golang | golang_maps | go1210 | 3 | #### func [EqualFunc](https://cs.opensource.google/go/go/+/go1.21.0:src/maps/maps.go;l=24) [¶](#EqualFunc "Go to EqualFunc")
```None
func EqualFunc[M1 ~map[K]V1, M2 ~map[K]V2, K comparable, V1, V2 any](m1 M1, m2 M2, eq func(V1, V2) bool) bool
```
EqualFunc is like Equal, but compares values using eq.
Keys are still c... | large_dataset/raw/docs/golang/maps/maps_go1210.md |
a03f4e74-bf0a-597d-8888-a5244876e27b | docs | golang | golang_maps | go1210 | 4 | ### Types [¶](#pkg-types "Go to Types")
This section is empty.
| large_dataset/raw/docs/golang/maps/maps_go1210.md |
f9b845c6-174f-53da-bd78-a3194690ffc3 | docs | golang | golang_maps | go1220 | 0 | # Golang - maps
Source: https://pkg.go.dev/maps@go1.22.0
Version: go1.22.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package maps defines various functions useful with maps of any type.
### Index [¶](#pkg-index "Go to Index")
* [func Clone[... | large_dataset/raw/docs/golang/maps/maps_go1220.md |
ac93ad79-b0eb-535a-8f12-9c1d19d99bfd | docs | golang | golang_maps | go1220 | 1 | ### Constants [¶](#pkg-constants "Go to Constants")
This section is empty.
### Variables [¶](#pkg-variables "Go to Variables")
This section is empty.
### Functions [¶](#pkg-functions "Go to Functions")
#### func [Clone](https://cs.opensource.google/go/go/+/go1.22.0:src/maps/maps.go;l=41) [¶](#Clone "Go to Clone")
... | large_dataset/raw/docs/golang/maps/maps_go1220.md |
a08aec9e-429c-5db8-9710-1b8caaadd262 | docs | golang | golang_maps | go1220 | 2 | #### func [Copy](https://cs.opensource.google/go/go/+/go1.22.0:src/maps/maps.go;l=53) [¶](#Copy "Go to Copy")
```None
func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2)
```
Copy copies all key/value pairs in src adding them to dst.
When a key in src is already present in dst,
the value in dst wi... | large_dataset/raw/docs/golang/maps/maps_go1220.md |
c5ec0cf1-183e-5354-9882-7b4a8b2e1733 | docs | golang | golang_maps | go1220 | 3 | m2 is: map[one:100 two:2]
m4 is: map[one:[1 2 3] two:[4 5 6]]
m3 is: map[one:[100 2 3] two:[4 5 6]]
m4 is: map[one:[100 2 3] two:[4 5 6]]
```
Share
Format
Run
#### func [DeleteFunc](https://cs.opensource.google/go/go/+/go1.22.0:src/maps/maps.go;l=60) [¶](#DeleteFunc "Go to DeleteFunc")
```None
func DeleteFunc[M ~map... | large_dataset/raw/docs/golang/maps/maps_go1220.md |
5b834cc7-e293-531b-8c33-e6291f62b006 | docs | golang | golang_maps | go1220 | 4 | #### func [Equal](https://cs.opensource.google/go/go/+/go1.22.0:src/maps/maps.go;l=10) [¶](#Equal "Go to Equal")
```None
func Equal[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool
```
Equal reports whether two maps contain the same key/value pairs.
Values are compared using ==.
Example [¶](#example-Equal "Go to... | large_dataset/raw/docs/golang/maps/maps_go1220.md |
1f4db7aa-d0a9-5c16-b376-70a68f6a6948 | docs | golang | golang_maps | go1220 | 5 | EqualFunc is like Equal, but compares values using eq.
Keys are still compared with ==.
Example [¶](#example-EqualFunc "Go to Example")
```None
package main
import (
"fmt"
"maps"
"strings"
)
func main() {
m1 := map[int]string{
1: "one",
10: "Ten",
1000: "THOUSAND",
}
m2 := map[int][]byte{
1: [... | large_dataset/raw/docs/golang/maps/maps_go1220.md |
732549e1-8c21-51d4-8c05-b6d5046d095f | docs | golang | golang_maps | go1230 | 0 | # Golang - maps
Source: https://pkg.go.dev/maps@go1.23.0
Version: go1.23.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package maps defines various functions useful with maps of any type.
This package does not have any special handling for non... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
e5b6c481-e924-5d28-b886-45d4bc14152b | docs | golang | golang_maps | go1230 | 1 | * [func Insert[Map ~map[K]V, K comparable, V any](m Map, seq iter.Seq2[K, V])](#Insert)
* [func Keys[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[K]](#Keys)
* [func Values[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[V]](#Values)
### Examples [¶](#pkg-examples "Go to Examples")
* [Clone](#example-Clone)
*... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
5cca7243-9f5b-5f49-866e-2f579e694a71 | docs | golang | golang_maps | go1230 | 2 | #### func [Clone](https://cs.opensource.google/go/go/+/go1.23.0:src/maps/maps.go;l=50) [¶](#Clone "Go to Clone")
```None
func Clone[M ~map[K]V, K comparable, V any](m M) M
```
Clone returns a copy of m. This is a shallow clone:
the new keys and values are set using ordinary assignment.
Example [¶](#example-Clone "Go... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
e5827219-f7de-507c-a19d-841548ec0900 | docs | golang | golang_maps | go1230 | 3 | Collect collects key-value pairs from seq into a new map
and returns it.
#### func [Copy](https://cs.opensource.google/go/go/+/go1.23.0:src/maps/maps.go;l=62) [¶](#Copy "Go to Copy")
```None
func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2)
```
Copy copies all key/value pairs in src adding the... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
95d2749c-3a2c-557c-a01e-a48d4151895c | docs | golang | golang_maps | go1230 | 4 | ```None
Output:
m2 is: map[one:1 two:2]
m1 is: map[one:1 two:2]
m2 is: map[one:100 two:2]
m4 is: map[one:[1 2 3] two:[4 5 6]]
m3 is: map[one:[100 2 3] two:[4 5 6]]
m4 is: map[one:[100 2 3] two:[4 5 6]]
```
Share
Format
Run
#### func [DeleteFunc](https://cs.opensource.google/go/go/+/go1.23.0:src/maps/maps.go;l=69) [¶... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
c22b686b-9dd9-559a-b1c5-f4a6a0063e2a | docs | golang | golang_maps | go1230 | 5 | #### func [Equal](https://cs.opensource.google/go/go/+/go1.23.0:src/maps/maps.go;l=17) [¶](#Equal "Go to Equal")
```None
func Equal[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool
```
Equal reports whether two maps contain the same key/value pairs.
Values are compared using ==.
Example [¶](#example-Equal "Go to... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
20e36f23-cf22-5cf9-bab7-579d1268182b | docs | golang | golang_maps | go1230 | 6 | EqualFunc is like Equal, but compares values using eq.
Keys are still compared with ==.
Example [¶](#example-EqualFunc "Go to Example")
```None
package main
import (
"fmt"
"maps"
"strings"
)
func main() {
m1 := map[int]string{
1: "one",
10: "Ten",
1000: "THOUSAND",
}
m2 := map[int][]byte{
1: [... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
1e102f27-e137-564a-919b-2eae80e7bfda | docs | golang | golang_maps | go1230 | 7 | #### func [Keys](https://cs.opensource.google/go/go/+/go1.23.0:src/maps/iter.go;l=25) [¶](#Keys "Go to Keys") added in go1.23.0
```None
func Keys[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[K]
```
Keys returns an iterator over keys in m.
The iteration order is not specified and is not guaranteed
to be the same... | large_dataset/raw/docs/golang/maps/maps_go1230.md |
3299c26f-111f-5fd5-8c7d-290be68410da | docs | golang | golang_maps | go1240 | 0 | # Golang - maps
Source: https://pkg.go.dev/maps@go1.24.0
Version: go1.24.0
## Documentation [¶](#section-documentation "Go to Documentation")
### Overview [¶](#pkg-overview "Go to Overview")
Package maps defines various functions useful with maps of any type.
This package does not have any special handling for non... | large_dataset/raw/docs/golang/maps/maps_go1240.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.