| 1 |
// Package convert contains some routines for converting between cty types. |
| 2 |
// The intent of providing this package is to encourage applications using |
| 3 |
// cty to have consistent type conversion behavior for maximal interoperability |
| 4 |
// when Values pass from one application to another. |
| 5 |
// |
| 6 |
// The conversions are categorized into two categories. "Safe" conversions are |
| 7 |
// ones that are guaranteed to succeed if given a non-null value of the |
| 8 |
// appropriate source type. "Unsafe" conversions, on the other hand, are valid |
| 9 |
// for only a subset of input values, and thus may fail with an error when |
| 10 |
// called for values outside of that valid subset. |
| 11 |
// |
| 12 |
// The functions whose names end in Unsafe support all of the conversions that |
| 13 |
// are supported by the corresponding functions whose names do not have that |
| 14 |
// suffix, and then additional unsafe conversions as well. |
| 15 |
package convert |