Merge pull request #129 from harshavardhana/pr_out_move_wrappers_at_pkgs_minio_back_to_cmd_minio_as_their_usage_is_limited

This commit is contained in:
Harshavardhana 2014-12-15 21:19:01 -08:00
commit 68eb14a1f6
11 changed files with 22 additions and 23 deletions

View File

@ -1,4 +1,4 @@
package minio package main
import ( import (
"errors" "errors"
@ -75,7 +75,7 @@ func parseInput(c *cli.Context) (inputConfig, error) {
return config, nil return config, nil
} }
func Getobjectdir(basename string) string { func getObjectdir(basename string) string {
user, err := user.Current() user, err := user.Current()
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)

View File

@ -1,4 +1,4 @@
package minio package main
import ( import (
"log" "log"
@ -6,7 +6,7 @@ import (
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
) )
func Encode(c *cli.Context) { func encode(c *cli.Context) {
config, err := parseInput(c) config, err := parseInput(c)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)

View File

@ -1,4 +1,4 @@
package minio package main
import ( import (
"bytes" "bytes"

View File

@ -1,4 +1,4 @@
package minio package main
import ( import (
"io" "io"
@ -8,7 +8,7 @@ import (
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
) )
func Get(c *cli.Context) { func get(c *cli.Context) {
config, err := parseInput(c) config, err := parseInput(c)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)

1
cmd/minio/init.go Normal file
View File

@ -0,0 +1 @@
package main

View File

@ -1,4 +1,4 @@
package minio package main
import ( import (
"io" "io"
@ -8,7 +8,7 @@ import (
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
) )
func List(c *cli.Context) { func list(c *cli.Context) {
config, err := parseInput(c) config, err := parseInput(c)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)

View File

@ -4,7 +4,6 @@ import (
"os" "os"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
"github.com/minio-io/minio/pkgs/minio"
) )
func main() { func main() {
@ -15,16 +14,16 @@ func main() {
{ {
Name: "encode", Name: "encode",
Usage: "erasure encode a byte stream", Usage: "erasure encode a byte stream",
Action: minio.Encode, Action: encode,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "root", Name: "root",
Value: minio.Getobjectdir(".minio/erasure"), Value: getObjectdir(".minio/erasure"),
Usage: "", Usage: "",
}, },
cli.StringFlag{ cli.StringFlag{
Name: "staging", Name: "staging",
Value: minio.Getobjectdir(".minio/staging"), Value: getObjectdir(".minio/staging"),
Usage: "", Usage: "",
}, },
cli.StringFlag{ cli.StringFlag{
@ -42,11 +41,11 @@ func main() {
{ {
Name: "get", Name: "get",
Usage: "get an object", Usage: "get an object",
Action: minio.Get, Action: get,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "root", Name: "root",
Value: minio.Getobjectdir(".minio/erasure"), Value: getObjectdir(".minio/erasure"),
Usage: "", Usage: "",
}, },
cli.StringFlag{ cli.StringFlag{
@ -64,11 +63,11 @@ func main() {
{ {
Name: "put", Name: "put",
Usage: "put an object", Usage: "put an object",
Action: minio.Put, Action: put,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "staging", Name: "staging",
Value: minio.Getobjectdir(".minio/staging"), Value: getObjectdir(".minio/staging"),
Usage: "", Usage: "",
}, },
cli.StringFlag{ cli.StringFlag{
@ -81,11 +80,11 @@ func main() {
{ {
Name: "list", Name: "list",
Usage: "list objects", Usage: "list objects",
Action: minio.List, Action: list,
Flags: []cli.Flag{ Flags: []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "root", Name: "root",
Value: minio.Getobjectdir(".minio/erasure"), Value: getObjectdir(".minio/erasure"),
Usage: "", Usage: "",
}, },
}, },

View File

@ -1,4 +1,4 @@
package minio package main
import ( import (
"log" "log"
@ -8,7 +8,7 @@ import (
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
) )
func Put(c *cli.Context) { func put(c *cli.Context) {
config, err := parseInput(c) config, err := parseInput(c)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)

1
cmd/minio/verify.go Normal file
View File

@ -0,0 +1 @@
package main

View File

@ -1 +0,0 @@
package minio

View File

@ -1 +0,0 @@
package minio