File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -134,25 +134,16 @@ type ListResultsStream struct {
134134// NoListResults is an iterator that pushes zero results.
135135var NoListResults = func (func (ListResult ) bool ) {}
136136
137- // ListResultsStreamError returns a function that yields a single
138- // [[ListResult]] with an error diagnostic
139- func ListResultsStreamError ( summary string , detail string ) iter.Seq [ListResult ] {
137+ // ListResultsStreamDiagnostics returns a function that yields a single
138+ // [[ListResult]] with the given Diagnostics
139+ func ListResultsStreamDiagnostics ( diags diag. Diagnostics ) iter.Seq [ListResult ] {
140140 return func (push func (ListResult ) bool ) {
141- if ! push (ListResultError ( summary , detail ) ) {
141+ if ! push (ListResult { Diagnostics : diags } ) {
142142 return
143143 }
144144 }
145145}
146146
147- // ListResultError constructs a [[ListResult]] with an error diagnostic
148- func ListResultError (summary string , detail string ) ListResult {
149- return ListResult {
150- Diagnostics : diag.Diagnostics {
151- diag .NewErrorDiagnostic (summary , detail ),
152- },
153- }
154- }
155-
156147// ListResult represents a listed managed resource instance.
157148type ListResult struct {
158149 // Identity is the identity of the managed resource instance.
You can’t perform that action at this time.
0 commit comments