Remove hyphenated properties in json output, helps scripting and programming.
This commit is contained in:
+2
-2
@@ -44,8 +44,8 @@ EXAMPLES:
|
||||
type HostMessage struct {
|
||||
op string
|
||||
Host string `json:"host"`
|
||||
AccessKeyID string `json:"access-key-id,omitempty"`
|
||||
SecretAccessKey string `json:"secret-access-key,omitempty"`
|
||||
AccessKeyID string `json:"accessKeyId,omitempty"`
|
||||
SecretAccessKey string `json:"secretAccessKey,omitempty"`
|
||||
}
|
||||
|
||||
// String string printer for Content metadata
|
||||
|
||||
@@ -39,7 +39,7 @@ const (
|
||||
// ContentMessage container for content message structure.
|
||||
type ContentMessage struct {
|
||||
Filetype string `json:"type"`
|
||||
Time time.Time `json:"last-modified"`
|
||||
Time time.Time `json:"lastModified"`
|
||||
Size int64 `json:"size"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ func listSessions() *probe.Error {
|
||||
// ClearSessionMessage container for clearing session messages
|
||||
type ClearSessionMessage struct {
|
||||
Status string `json:"success"`
|
||||
SessionID string `json:"session-id"`
|
||||
SessionID string `json:"sessionId"`
|
||||
}
|
||||
|
||||
func (c ClearSessionMessage) String() string {
|
||||
|
||||
+2
-2
@@ -59,8 +59,8 @@ func (s shareDuration) String() string {
|
||||
return console.Colorize("Share", fmt.Sprintf("Expiry: %s\n URL: %s", durationString(), s.presignedURL))
|
||||
}
|
||||
shareMessageBytes, err := json.Marshal(struct {
|
||||
Expires time.Duration `json:"expire-seconds"`
|
||||
PresignedURL string `json:"presigned-url"`
|
||||
Expires time.Duration `json:"expireSeconds"`
|
||||
PresignedURL string `json:"presignedURL"`
|
||||
}{
|
||||
Expires: time.Duration(s.Seconds()),
|
||||
PresignedURL: s.presignedURL,
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ type Updates struct {
|
||||
// UpdateMessage container to hold update messages
|
||||
type UpdateMessage struct {
|
||||
Update bool `json:"update"`
|
||||
Download string `json:"download-url"`
|
||||
Download string `json:"downloadURL"`
|
||||
Version time.Time `json:"version"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user