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()
}
if command == "login" && !metrics.HasQuietFlag(commandArgs) {
utils.DisplayPATSuggestMsg(commandArgs)
displayPATSuggestMsg(commandArgs)
}
metrics.Track(store.DefaultContextType, os.Args[1:], compose.SuccessStatus)

View File

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

View File

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