-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Idea] [Breaking changes!] Add shorthand flags #171
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a66f6a7
flags beta
xmudrii 3e340d7
vendoring godo update
xmudrii 6e8eaa1
resolving conflicts
xmudrii fdbfe3c
resolving conflicts
xmudrii 4f776dd
[FINAL] resolving conflicts
xmudrii a18db07
formating
xmudrii 58dad03
removed placeholder
xmudrii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
/* | ||
Copyright 2016 The Doctl Authors All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package doctl | ||
|
||
const ( | ||
/** | ||
// ArgActionID is an action id argument. | ||
ArgActionID = "action-id" | ||
// ArgActionAfter is an action after argument. | ||
ArgActionAfter = "after" | ||
// ArgActionBefore is an action before argument. | ||
ArgActionBefore = "before" | ||
// ArgActionResourceType is an action resource type argument. | ||
ArgActionResourceType = "resource-type" | ||
// ArgActionRegion is an action region argument. | ||
ArgActionRegion = "region" | ||
// ArgActionStatus is an action status argument. | ||
ArgActionStatus = "status" | ||
// ArgActionType is an action type argument. | ||
ArgActionType = "action-type" | ||
// ArgCommandWait is a wait for a droplet to be created argument. | ||
ArgCommandWait = "wait" | ||
// ArgDomainName is a domain name argument. | ||
ArgDomainName = "domain-name" | ||
// ArgDropletID is a droplet id argument. | ||
ArgDropletID = "droplet-id" | ||
// ArgKernelID is a ekrnel id argument. | ||
ArgKernelID = "kernel-id" | ||
// ArgImage is an image argument. | ||
ArgImage = "image" | ||
// ArgImageID is an image id argument. | ||
ArgImageID = "image-id" | ||
// ArgImagePublic is a public image argument. | ||
ArgImagePublic = "public" | ||
// ArgImageSlug is an image slug argment. | ||
ArgImageSlug = "image-slug" | ||
// ArgIPAddress is an IP address argument. | ||
ArgIPAddress = "ip-address" | ||
// ArgDropletName is a droplet name argument. | ||
ArgDropletName = "droplet-name" | ||
// ArgResizeDisk is a resize disk argument. | ||
ArgResizeDisk = "resize-disk" | ||
// ArgSnapshotName is a snapshot name arugment. | ||
ArgSnapshotName = "snapshot-name" | ||
// ArgBackups is an enable backups argument. | ||
ArgBackups = "enable-backups" | ||
// ArgIPv6 is an enable IPv6 argument. | ||
ArgIPv6 = "enable-ipv6" | ||
// ArgPrivateNetworking is an enable private networking argument. | ||
ArgPrivateNetworking = "enable-private-networking" | ||
// ArgRecordData is a record data argument. | ||
ArgRecordData = "record-data" | ||
// ArgRecordID is a record id argument. | ||
ArgRecordID = "record-id" | ||
// ArgRecordName is a record name argument. | ||
ArgRecordName = "record-name" | ||
// ArgRecordPort is a record port argument. | ||
ArgRecordPort = "record-port" | ||
// ArgRecordPriority is a record priority argument. | ||
ArgRecordPriority = "record-priority" | ||
// ArgRecordType is a record type argument. | ||
ArgRecordType = "record-type" | ||
// ArgRecordWeight is a record weight argument. | ||
ArgRecordWeight = "record-weight" | ||
// ArgRegionSlug is a region slug argument. | ||
ArgRegionSlug = "region" | ||
// ArgSizeSlug is a size slug argument. | ||
ArgSizeSlug = "size" | ||
// ArgsSSHKeyPath is a ssh argument. | ||
ArgsSSHKeyPath = "ssh-key-path" | ||
// ArgSSHKeys is a ssh key argument. | ||
ArgSSHKeys = "ssh-keys" | ||
// ArgsSSHPort is a ssh argument. | ||
ArgsSSHPort = "ssh-port" | ||
// ArgsSSHAgentForwarding is a ssh argument. | ||
ArgsSSHAgentForwarding = "ssh-agent-forwarding" | ||
// ArgsSSHPrivateIP is a ssh argument. | ||
ArgsSSHPrivateIP = "ssh-private-ip" | ||
// ArgUserData is a user data argument. | ||
ArgUserData = "user-data" | ||
// ArgUserDataFile is a user data file location argument. | ||
ArgUserDataFile = "user-data-file" | ||
// ArgImageName name is an image name argument. | ||
ArgImageName = "image-name" | ||
// ArgKey is a key argument. | ||
ArgKey = "key" | ||
// ArgKeyName is a key name argument. | ||
ArgKeyName = "key-name" | ||
// ArgKeyPublicKey is a public key argument. | ||
ArgKeyPublicKey = "public-key" | ||
// ArgKeyPublicKeyFile is a public key file argument. | ||
ArgKeyPublicKeyFile = "public-key-file" | ||
// ArgSSHUser is a SSH user argument. | ||
ArgSSHUser = "ssh-user" | ||
// ArgFormat is columns to include in output argment. | ||
ArgFormat = "format" | ||
// ArgNoHeader hides the output header. | ||
ArgNoHeader = "no-header" | ||
// ArgPollTime is how long before the next poll argument. | ||
ArgPollTime = "poll-timeout" | ||
// ArgTagName is a tag name | ||
ArgTagName = "tag-name" | ||
// ArgTagNames is a slice of possible tag names | ||
ArgTagNames = "tag-names" | ||
//ArgTemplate is template format | ||
ArgTemplate = "template" | ||
|
||
// ArgOutput is an output type argument. | ||
ArgOutput = "output" | ||
|
||
// ArgVolumeSize is the size of a volume. | ||
ArgVolumeSize = "size" | ||
// ArgVolumeDesc is the description of a volume. | ||
ArgVolumeDesc = "desc" | ||
// ArgVolumeRegion is the region of a volume. | ||
ArgVolumeRegion = "region" | ||
// ArgVolumeList is the IDs of many volumes. | ||
ArgVolumeList = "volumes" | ||
*/ | ||
// ArgDeleteForce forces deletion actions | ||
ArgShortDeleteForce = "f" | ||
|
||
// ArgResourceType is the resource type for snapshot. | ||
//ArgShortResourceType = "resource" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why this large block of commented out code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption was some placeholder in case we want to introduce more short flags for other things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nanzhong @aybabtme I left it for placeholder, but I removed it. For now I defined it for force action, but we can add more actions later.