From 8dbfe7b3debd7a4242aa779f402374f61a7d372f Mon Sep 17 00:00:00 2001 From: wafuwafu13 Date: Sat, 22 Apr 2023 13:41:25 +0100 Subject: [PATCH] fix: name, typo --- events/ecs_container_instance.go | 34 +++++++++++++-------------- events/ecs_container_instance_test.go | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/events/ecs_container_instance.go b/events/ecs_container_instance.go index 94aadbf8..4ef48b78 100644 --- a/events/ecs_container_instance.go +++ b/events/ecs_container_instance.go @@ -18,39 +18,39 @@ type ECSContainerInstanceEvent struct { } type ECSContainerInstanceEventDetailType struct { - AgentConnected bool `json:"agentConnected"` - Attributes []Attribute `json:"attributes"` - ClusterARN string `json:"clusterArn"` - ContainerInstanceARN string `json:"containerInstanceArn"` - EC2InstanceID string `json:"ec2InstanceId"` - RegisteredResources []Resource `json:"registeredResources"` - RemainingResources []Resource `json:"remainingResources"` - Status string `json:"status"` - Version int `json:"version"` - VersionInfo VersionInfo `json:"versionInfo"` - UpdatedAt time.Time `json:"updatedAt"` + AgentConnected bool `json:"agentConnected"` + Attributes []ECSContainerInstanceEventAttribute `json:"attributes"` + ClusterARN string `json:"clusterArn"` + ContainerInstanceARN string `json:"containerInstanceArn"` + EC2InstanceID string `json:"ec2InstanceId"` + RegisteredResources []ECSContainerInstanceEventResource `json:"registeredResources"` + RemainingResources []ECSContainerInstanceEventResource `json:"remainingResources"` + Status string `json:"status"` + Version int `json:"version"` + VersionInfo ECSContainerInstanceEventVersionInfo `json:"versionInfo"` + UpdatedAt time.Time `json:"updatedAt"` } -type Attribute struct { +type ECSContainerInstanceEventAttribute struct { Name string `json:"name"` } -type Resource struct { +type ECSContainerInstanceEventResource struct { Name string `json:"name"` Type string `json:"type"` IntegerValue int `json:"integerValue,omitempty"` StringSetValue []*string `json:"stringSetValue,omitempty"` } -type VersionInfo struct { +type ECSContainerInstanceEventVersionInfo struct { AgentHash string `json:"agentHash"` AgentVersion string `json:"agentVersion"` DockerVersion string `json:"dockerVersion"` } -// MarshalJSON implements cuustom marshaling to marshal the struct into JSON format while preserving an empty string slice in `StringSetValue` field. -func (r Resource) MarshalJSON() ([]byte, error) { - type Alias Resource +// MarshalJSON implements custom marshaling to marshal the struct into JSON format while preserving an empty string slice in `StringSetValue` field. +func (r ECSContainerInstanceEventResource) MarshalJSON() ([]byte, error) { + type Alias ECSContainerInstanceEventResource aux := struct { StringSetValue json.RawMessage `json:"stringSetValue,omitempty"` Alias diff --git a/events/ecs_container_instance_test.go b/events/ecs_container_instance_test.go index b1fb57be..1e7229ac 100644 --- a/events/ecs_container_instance_test.go +++ b/events/ecs_container_instance_test.go @@ -1,4 +1,4 @@ -// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. package events import (