浏览代码

Move pat_suggest.go into `cli` package

Signed-off-by: Amine Chouki <[email protected]>
Amine Chouki 4 年之前
父节点
当前提交
5c427ef702
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      cli/mobycli/exec.go
  2. 3 3
      cli/mobycli/pat_suggest.go
  3. 1 1
      cli/mobycli/pat_suggest_test.go

+ 1 - 1
cli/mobycli/exec.go

@@ -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)
 

+ 3 - 3
pkg/utils/pat_suggest.go → cli/mobycli/pat_suggest.go

@@ -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
 	}

+ 1 - 1
pkg/utils/pat_suggest_test.go → cli/mobycli/pat_suggest_test.go

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