فهرست منبع

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

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

@@ -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.
-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" {
 	if os.Getenv("DOCKER_PAT_SUGGEST") == "false" {
 		return
 		return
 	}
 	}

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

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