This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue: add function for Value.Attributes()
First attempt by @verdverm, significant edits by @mpvl. The API has been designed so that new attribute types can be added without breaking anything: the user will always have to explicitly specify the types of attributes that are needed. This does not handle duplicate attributes. In the future, there could be merge functionality for this purpose. This could be done by adding option flags if we can settle on what constitutes good options. Original comments from Tony: This enables a user of the Go API to get all attributes so they can inspect them, rather than only being able to ask if a particular attribute exists on a value. Really useful for tools leveraging CUE! I recall @mpvl might have wanted the return to be a Value or List rather than the slice? Closes #529 #529 GitOrigin-RevId: 6a8951a Change-Id: Ie3cc9983656864fa44852b924a3142c82e336f4a
- Loading branch information
Showing
3 changed files
with
172 additions
and
4 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
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