Move pat_suggest.go into `cli` package

Signed-off-by: Amine Chouki <amine.chouki@docker.com>
This commit is contained in:
Amine Chouki 2021-07-23 10:55:31 -04:00
parent e16d0b48dd
commit 5c427ef702
3 changed files with 5 additions and 5 deletions

View File

@ -83,7 +83,7 @@ func Exec(root *cobra.Command) {
utils.DisplayScanSuggestMsg() utils.DisplayScanSuggestMsg()
} }
if command == "login" && !metrics.HasQuietFlag(commandArgs) { if command == "login" && !metrics.HasQuietFlag(commandArgs) {
utils.DisplayPATSuggestMsg(commandArgs) displayPATSuggestMsg(commandArgs)
} }
metrics.Track(store.DefaultContextType, os.Args[1:], compose.SuccessStatus) metrics.Track(store.DefaultContextType, os.Args[1:], compose.SuccessStatus)

View File

@ -14,7 +14,7 @@
limitations under the License. limitations under the License.
*/ */
package utils package mobycli
import ( import (
"fmt" "fmt"
@ -35,8 +35,8 @@ For better security, log in with a limited-privilege personal access token. Lear
patPrefix = "dckrp_" patPrefix = "dckrp_"
) )
// DisplayPATSuggestMsg displays a message suggesting users to use PATs instead of passwords to reduce scope. // displayPATSuggestMsg displays a message suggesting users to use PATs instead of passwords to reduce scope.
func DisplayPATSuggestMsg(cmdArgs []string) { func displayPATSuggestMsg(cmdArgs []string) {
if os.Getenv("DOCKER_PAT_SUGGEST") == "false" { if os.Getenv("DOCKER_PAT_SUGGEST") == "false" {
return return
} }

View File

@ -14,7 +14,7 @@
limitations under the License. limitations under the License.
*/ */
package utils package mobycli
import ( import (
"testing" "testing"