Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Chu Peng 楚鹏
minikube
提交
e37f8bc1
M
minikube
项目概览
Chu Peng 楚鹏
/
minikube
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
minikube
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e37f8bc1
编写于
3月 26, 2021
作者:
T
Tharun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add unload as an alias and fixed parent command usage
Signed-off-by:
N
Tharun
<
rajendrantharun@live.com
>
上级
3503c3ea
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
12 deletion
+28
-12
cmd/minikube/cmd/image.go
cmd/minikube/cmd/image.go
+10
-7
pkg/generate/docs.go
pkg/generate/docs.go
+5
-0
site/content/en/docs/commands/image.md
site/content/en/docs/commands/image.md
+13
-5
未找到文件。
cmd/minikube/cmd/image.go
浏览文件 @
e37f8bc1
...
...
@@ -33,9 +33,8 @@ import (
// imageCmd represents the image command
var
imageCmd
=
&
cobra
.
Command
{
Use
:
"image"
,
Short
:
"Load a local image into minikube"
,
Long
:
"Load a local image into minikube"
,
Use
:
"image COMMAND"
,
Short
:
"Manage images"
,
}
var
(
...
...
@@ -126,10 +125,14 @@ var loadImageCmd = &cobra.Command{
}
var
removeImageCmd
=
&
cobra
.
Command
{
Use
:
"rm IMAGE [IMAGE...]"
,
Short
:
"Remove one or more images"
,
Long
:
"Remove a image from minikube"
,
Example
:
"minikube image rm image busybox"
,
Use
:
"rm IMAGE [IMAGE...]"
,
Short
:
"Remove one or more images"
,
Example
:
`
$ minikube image rm image busybox
$ minikube image unload image busybox
`
,
Aliases
:
[]
string
{
"unload"
},
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
if
len
(
args
)
==
0
{
exit
.
Message
(
reason
.
Usage
,
"Please provide an image to remove via <minikube image rm IMAGE_NAME>"
)
...
...
pkg/generate/docs.go
浏览文件 @
e37f8bc1
...
...
@@ -96,6 +96,11 @@ func GenMarkdownCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string)
buf
.
WriteString
(
fmt
.
Sprintf
(
"```shell
\n
%s
\n
```
\n\n
"
,
cmd
.
UseLine
()))
}
if
len
(
cmd
.
Aliases
)
>
0
{
buf
.
WriteString
(
"### Aliases
\n\n
"
)
buf
.
WriteString
(
fmt
.
Sprintf
(
"%s
\n\n
"
,
cmd
.
Aliases
))
}
if
len
(
cmd
.
Example
)
>
0
{
buf
.
WriteString
(
"### Examples
\n\n
"
)
buf
.
WriteString
(
fmt
.
Sprintf
(
"```
\n
%s
\n
```
\n\n
"
,
cmd
.
Example
))
...
...
site/content/en/docs/commands/image.md
浏览文件 @
e37f8bc1
---
title
:
"
image"
description
:
>
Load a local image into minikube
Manage images
---
## minikube image
Load a local image into minikube
Manage images
### Synopsis
Load a local image into minikube
Manage images
### Options inherited from parent commands
...
...
@@ -124,16 +124,24 @@ Remove one or more images
### Synopsis
Remove
a image from minikube
Remove
one or more images
```
shell
minikube image
rm
IMAGE
[
IMAGE...]
[
flags]
```
### Aliases
[unload]
### Examples
```
minikube image rm image busybox
$ minikube image rm image busybox
$ minikube image unload image busybox
```
### Options inherited from parent commands
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录