update go docs and examples

This commit is contained in:
darrell-thobe-sp
2025-05-13 13:16:33 -04:00
parent d89039d220
commit 9e03821762
255 changed files with 3678 additions and 3678 deletions

View File

@@ -83,7 +83,7 @@ import (
)
func main() {
data := []byte(`{
segment := []byte(`{
"owner" : {
"name" : "support",
"id" : "2c9180a46faadee4016fb4e018c20639",
@@ -110,7 +110,7 @@ func main() {
var segment v3.Segment
if err := json.Unmarshal(data, &segment); err != nil {
if err := json.Unmarshal(segment, &segment); err != nil {
fmt.Println("Error:", err)
return
}
@@ -378,11 +378,11 @@ import (
func main() {
id := `ef38f94347e94562b5bb8424a56397d8` // string | The segment ID to modify. # string | The segment ID to modify.
requestBody := fmt.Sprintf(`[{op=replace, path=/visibilityCriteria, value={expression={operator=AND, children=[{operator=EQUALS, attribute=location, value={type=STRING, value=Philadelphia}}, {operator=EQUALS, attribute=department, value={type=STRING, value=HR}}]}}}]`) // []map[string]interface{} | A list of segment update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * owner * visibilityCriteria * active
requestbody := []byte(`[{op=replace, path=/visibilityCriteria, value={expression={operator=AND, children=[{operator=EQUALS, attribute=location, value={type=STRING, value=Philadelphia}}, {operator=EQUALS, attribute=department, value={type=STRING, value=HR}}]}}}]`) // []map[string]interface{} | A list of segment update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * owner * visibilityCriteria * active
var requestBody v3.RequestBody
if err := json.Unmarshal(data, &requestBody); err != nil {
var requestBody v3.[]RequestBody
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
fmt.Println("Error:", err)
return
}