command/intention: address comment feedback

This commit is contained in:
Mitchell Hashimoto 2018-05-22 10:22:41 -07:00
parent 1906fe1c0d
commit a69e3087b2
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
3 changed files with 6 additions and 2 deletions

View File

@ -92,7 +92,7 @@ func (c *cmd) Run(args []string) int {
// Go through and create each intention
for _, ixn := range ixns {
// If replace is set to true, then find this intention and delete it.
// If replace is set to true, then perform an update operation.
if c.flagReplace {
oldIxn, err := find.Find(ixn.SourceString(), ixn.DestinationString())
if err != nil {

View File

@ -13,6 +13,10 @@ import (
// caches them once, and searches in-memory for this. For now this works since
// even with a very large number of intentions, the size of the data gzipped
// over HTTP will be relatively small.
//
// The Finder will only downlaod the intentions one time. This struct is
// not expected to be used over a long period of time. Though it may be
// reused multile times, the intentions list is only downloaded once.
type Finder struct {
// Client is the API client to use for any requests.
Client *api.Client

View File

@ -28,7 +28,7 @@ const help = `
Usage: consul intention <subcommand> [options] [args]
This command has subcommands for interacting with intentions. Intentions
are the permissions for what services are allowed to communicate via
are permissions describing which services are allowed to communicate via
Connect. Here are some simple examples, and more detailed examples are
available in the subcommands or the documentation.