Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly committed Jan 10, 2024
1 parent 0a5706f commit a4a7626
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/api/go/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
}
}`

var payload interface{}
var payload any
if err := json.Unmarshal([]byte(requestJSON), &payload); err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion website/catalog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func main() {
panic(err)
}
defer mkdocs.Close()
if err := template.Execute(mkdocs, map[string]interface{}{
if err := template.Execute(mkdocs, map[string]any{
"Policies": pols,
}); err != nil {
panic(err)
Expand Down
4 changes: 2 additions & 2 deletions website/docs/go-library/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ func main() {
}
}`

var payload interface{}
var payload any
if err := json.Unmarshal([]byte(requestJSON), &payload); err != nil {
panic(err)
}

// create a JsonEngineRequest
request := jsonengine.JsonEngineRequest{
Resources: []interface{}{payload},
Resources: []any{payload},
Policies: policies,
}

Expand Down
2 changes: 1 addition & 1 deletion website/playground-examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func load(file string) string {
if err != nil {
panic(err)
}
var obj interface{}
var obj any
if err := json.Unmarshal(content, &obj); err != nil {
panic(err)
}
Expand Down

0 comments on commit a4a7626

Please sign in to comment.