Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
cue: undeprecate Iterator.Label
Browse files Browse the repository at this point in the history
The necessary functionality for Selector isn't fully there yet.

Keep it hidden, though.

Change-Id: I7d3f65cba99c489f350978153a4bc0bb8d43d327
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9542
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
mpvl committed Apr 29, 2021
1 parent b449c0f commit ac7e992
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cue/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,12 @@ func (i *Iterator) Selector() Selector {
return featureToSel(i.f, i.idx)
}

// Label reports the label of the value if i iterates over struct fields and
// "" otherwise.
// Label reports the label of the value if i iterates over struct fields and ""
// otherwise.
//
//
// Deprecated: use i.Selector().String(). Note that this will give more accurate
// string representations.
// Slated to be deprecated: use i.Selector().String(). Note that this will give
// more accurate string representations.
func (i *hiddenIterator) Label() string {
if i.f == 0 {
return ""
Expand Down

0 comments on commit ac7e992

Please sign in to comment.