mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-09 20:37:47 +00:00
update go docs and examples
This commit is contained in:
@@ -84,7 +84,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
data := []byte(`{
|
||||
searchattributeconfig := []byte(`{
|
||||
"displayName" : "New Mail Attribute",
|
||||
"name" : "newMailAttribute",
|
||||
"applicationAttributes" : {
|
||||
@@ -95,7 +95,7 @@ func main() {
|
||||
|
||||
|
||||
var searchAttributeConfig beta.SearchAttributeConfig
|
||||
if err := json.Unmarshal(data, &searchAttributeConfig); err != nil {
|
||||
if err := json.Unmarshal(searchattributeconfig, &searchAttributeConfig); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
@@ -362,11 +362,11 @@ import (
|
||||
|
||||
func main() {
|
||||
name := `promotedMailAttribute` // string | Name of the extended search attribute configuration to patch. # string | Name of the extended search attribute configuration to patch.
|
||||
jsonPatchOperation := fmt.Sprintf(`[{op=replace, path=/name, value=newAttributeName}, {op=replace, path=/displayName, value=new attribute display name}, {op=add, path=/applicationAttributes, value={2c91808b79fd2422017a0b35d30f3968=employeeNumber}}]`) // []JsonPatchOperation |
|
||||
jsonpatchoperation := []byte(`[{op=replace, path=/name, value=newAttributeName}, {op=replace, path=/displayName, value=new attribute display name}, {op=add, path=/applicationAttributes, value={2c91808b79fd2422017a0b35d30f3968=employeeNumber}}]`) // []JsonPatchOperation |
|
||||
|
||||
|
||||
var jsonPatchOperation beta.JsonPatchOperation
|
||||
if err := json.Unmarshal(data, &jsonPatchOperation); err != nil {
|
||||
var jsonPatchOperation beta.[]JsonPatchOperation
|
||||
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user