|
4 | 4 | // not use this file except in compliance with the License. You may obtain
|
5 | 5 | // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
6 | 6 |
|
7 |
| -// Package bsoncore contains functions that can be used to encode and decode BSON |
8 |
| -// elements and values to or from a slice of bytes. These functions are aimed at |
9 |
| -// allowing low level manipulation of BSON and can be used to build a higher |
10 |
| -// level BSON library. |
| 7 | +// Package bsoncore is intended for internal use only. It is made available to |
| 8 | +// facilitate use cases that require access to internal MongoDB driver |
| 9 | +// functionality and state. The API of this package is not stable and there is |
| 10 | +// no backward compatibility guarantee. |
| 11 | +// |
| 12 | +// WARNING: THIS PACKAGE IS EXPERIMENTAL AND MAY BE MODIFIED OR REMOVED WITHOUT |
| 13 | +// NOTICE! USE WITH EXTREME CAUTION! |
| 14 | +// |
| 15 | +// Package bsoncore contains functions that can be used to encode and decode |
| 16 | +// BSON elements and values to or from a slice of bytes. These functions are |
| 17 | +// aimed at allowing low level manipulation of BSON and can be used to build a |
| 18 | +// higher level BSON library. |
11 | 19 | //
|
12 | 20 | // The Read* functions within this package return the values of the element and
|
13 | 21 | // a boolean indicating if the values are valid. A boolean was used instead of
|
14 | 22 | // an error because any error that would be returned would be the same: not
|
15 | 23 | // enough bytes. This library attempts to do no validation, it will only return
|
16 | 24 | // false if there are not enough bytes for an item to be read. For example, the
|
17 | 25 | // ReadDocument function checks the length, if that length is larger than the
|
18 |
| -// number of bytes available, it will return false, if there are enough bytes, it |
19 |
| -// will return those bytes and true. It is the consumers responsibility to |
| 26 | +// number of bytes available, it will return false, if there are enough bytes, |
| 27 | +// it will return those bytes and true. It is the consumers responsibility to |
20 | 28 | // validate those bytes.
|
21 | 29 | //
|
22 | 30 | // The Append* functions within this package will append the type value to the
|
23 | 31 | // given dst slice. If the slice has enough capacity, it will not grow the
|
24 | 32 | // slice. The Append*Element functions within this package operate in the same
|
25 | 33 | // way, but additionally append the BSON type and the key before the value.
|
26 |
| -// |
27 |
| -// Warning: Package bsoncore is unstable and there is no backward compatibility |
28 |
| -// guarantee. It is experimental and subject to change. |
29 | 34 | package bsoncore
|
0 commit comments