... | ... | @@ -148,7 +148,7 @@ for _, item := range list.Items { |
|
|
|
|
|
The _goto_ statements MUST NOT be used as they generally make the code flow harder to follow, and there are alternative ways to achieve the same behavior.
|
|
|
|
|
|
Unit Tests with Large Input
|
|
|
## Unit Tests with Large Input
|
|
|
|
|
|
Suppose a test requires a long input string (e.g., an Kea entire configuration). We could could declare it in a constant or create a function returning this string, but the large blobs of text are hard to browse. We recommend moving the input text to a separate text file and using the _Golang embed_ mechanism to read the file into a variable in the test. For example:
|
|
|
|
... | ... | |