Move wrappers at pkgs/minio back to cmd/minio - as their usage is limited

This commit is contained in:
Harshavardhana 2014-12-15 20:09:50 -08:00
parent 1f8806b44f
commit 98119707fb
11 changed files with 22 additions and 23 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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