@@ -117,7 +117,7 @@ func dataSourceGithubProjectFields() *schema.Resource {
117117 }
118118}
119119
120- func dataSourceGithubProjectFieldsRead (d * schema.ResourceData , meta interface {} ) error {
120+ func dataSourceGithubProjectFieldsRead (d * schema.ResourceData , meta any ) error {
121121 client := meta .(* Owner ).v3client
122122 ctx := context .Background ()
123123
@@ -136,7 +136,7 @@ func dataSourceGithubProjectFieldsRead(d *schema.ResourceData, meta interface{})
136136 for {
137137 if opts == nil {
138138 opts = & github.ListProjectsOptions {
139- ListProjectsPaginationOptions : github.ListProjectsPaginationOptions {PerPage : github .Int (100 )},
139+ ListProjectsPaginationOptions : github.ListProjectsPaginationOptions {PerPage : github .Ptr (100 )},
140140 }
141141 }
142142
@@ -150,7 +150,7 @@ func dataSourceGithubProjectFieldsRead(d *schema.ResourceData, meta interface{})
150150 }
151151
152152 if err != nil {
153- return fmt .Errorf ("error listing project fields: %v " , err )
153+ return fmt .Errorf ("error listing project fields: %w " , err )
154154 }
155155
156156 allFields = append (allFields , fields ... )
@@ -161,8 +161,8 @@ func dataSourceGithubProjectFieldsRead(d *schema.ResourceData, meta interface{})
161161
162162 opts = & github.ListProjectsOptions {
163163 ListProjectsPaginationOptions : github.ListProjectsPaginationOptions {
164- PerPage : github .Int (100 ),
165- After : github .String (resp .After ),
164+ PerPage : github .Ptr (100 ),
165+ After : github .Ptr (resp .After ),
166166 },
167167 }
168168 }
@@ -176,10 +176,10 @@ func dataSourceGithubProjectFieldsRead(d *schema.ResourceData, meta interface{})
176176 }
177177 d .SetId (resourceID )
178178
179- fieldsData := make ([]map [string ]interface {} , 0 , len (allFields ))
179+ fieldsData := make ([]map [string ]any , 0 , len (allFields ))
180180
181181 for _ , field := range allFields {
182- fieldData := map [string ]interface {} {
182+ fieldData := map [string ]any {
183183 "id" : field .GetID (),
184184 "node_id" : field .GetNodeID (),
185185 "name" : field .GetName (),
@@ -191,9 +191,9 @@ func dataSourceGithubProjectFieldsRead(d *schema.ResourceData, meta interface{})
191191
192192 // Add options for single_select fields
193193 if len (field .Options ) > 0 {
194- optionsData := make ([]map [string ]interface {} , 0 , len (field .Options ))
194+ optionsData := make ([]map [string ]any , 0 , len (field .Options ))
195195 for _ , option := range field .Options {
196- optionData := map [string ]interface {} {
196+ optionData := map [string ]any {
197197 "id" : option .GetID (),
198198 "color" : option .GetColor (),
199199 }
@@ -217,7 +217,7 @@ func dataSourceGithubProjectFieldsRead(d *schema.ResourceData, meta interface{})
217217 }
218218
219219 if err := d .Set ("fields" , fieldsData ); err != nil {
220- return fmt .Errorf ("error setting fields: %v " , err )
220+ return fmt .Errorf ("error setting fields: %w " , err )
221221 }
222222
223223 return nil
0 commit comments