소스 검색

etcdctl: slightly enhance output of role revoke-permission

Hitoshi Mitake 10 년 전
부모
커밋
0173564122
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      etcdctl/ctlv3/command/role_command.go

+ 5 - 1
etcdctl/ctlv3/command/role_command.go

@@ -206,5 +206,9 @@ func roleRevokePermissionCommandFunc(cmd *cobra.Command, args []string) {
 		ExitWithError(ExitError, err)
 	}
 
-	fmt.Printf("Permission of key %s is revoked from role %s\n", args[1], args[0])
+	if len(rangeEnd) == 0 {
+		fmt.Printf("Permission of key %s is revoked from role %s\n", args[1], args[0])
+	} else {
+		fmt.Printf("Permission of range [%s, %s) is revoked from role %s\n", args[1], rangeEnd, args[0])
+	}
 }