-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Any dict entry can be `null`, which means that subsequent calls to its fields can lead to unexpected behavior. Such is the case of `contains`. This call makes a lot of sense on top of e.g. a string array: ```coffee ["a", "b"].contains("b") ``` But if the structure doesn't exist, then the call fails in unexpected ways: ``` left side of operation is null ``` This approach still uses an old way of addressing the problem, which looks quite a bit ugly in the implementation. We have to check for non-nil and for non-zero length. Once v10 comes around, we can rely on the `empty` keyword and all this is reduced to just the internal non-empty check. Signed-off-by: Dominik Richter <[email protected]>
- Loading branch information
Showing
7 changed files
with
118 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ mgroup | |
Mpim | ||
nodepool | ||
nullgroup | ||
nullstring | ||
opcplc | ||
Pids | ||
postgre | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
providers-sdk/v1/testutils/mockprovider/resources/mockprovider.lr.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters