From ac595b1f2eff182d931a1c314499e2d6542f7729 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Fri, 1 May 2015 18:20:22 -0700 Subject: [PATCH] Fixing documentation issues with expire --- main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index dee65c6e2..ae657cd7a 100644 --- a/main.go +++ b/main.go @@ -58,7 +58,7 @@ var memoryCmd = cli.Command{ minio mode {{.Name}} - {{.Description}} USAGE: - minio mode {{.Name}} SIZE + minio mode {{.Name}} limit SIZE expire TIME EXAMPLES: 1. Limit maximum memory usage to 64MB with 1h expiration @@ -167,7 +167,7 @@ func runMemory(c *cli.Context) { args = args.Tail() maxMemorySet = true } - case "expiration": + case "expire": { if expirationSet { Fatalf("Expiration should be set only once") @@ -186,6 +186,9 @@ func runMemory(c *cli.Context) { } } } + if maxMemorySet == false { + Fatalln("Memory limit must be set") + } memoryDriver := server.MemoryFactory{ Config: apiServerConfig, MaxMemory: maxMemory,