Browse Source

go fmt

pull/1096/head
Chris Lu 5 years ago
parent
commit
69de05f6cb
  1. 1
      weed/command/filer_copy.go
  2. 5
      weed/command/shell.go
  3. 4
      weed/shell/commands.go

1
weed/command/filer_copy.go

@ -400,7 +400,6 @@ func (worker *FileCopyWorker) uploadFileInChunks(ctx context.Context, task FileC
wg.Wait() wg.Wait()
close(chunksChan) close(chunksChan)
var chunks []*filer_pb.FileChunk var chunks []*filer_pb.FileChunk
for chunk := range chunksChan { for chunk := range chunksChan {
chunks = append(chunks, chunk) chunks = append(chunks, chunk)

5
weed/command/shell.go

@ -13,9 +13,8 @@ import (
) )
var ( var (
shellOptions shell.ShellOptions
shellOptions shell.ShellOptions
shellInitialFilerUrl *string shellInitialFilerUrl *string
) )
func init() { func init() {
@ -32,13 +31,11 @@ var cmdShell = &Command{
`, `,
} }
func runShell(command *Command, args []string) bool { func runShell(command *Command, args []string) bool {
util.LoadConfiguration("security", false) util.LoadConfiguration("security", false)
shellOptions.GrpcDialOption = security.LoadClientTLS(viper.Sub("grpc"), "client") shellOptions.GrpcDialOption = security.LoadClientTLS(viper.Sub("grpc"), "client")
var filerPwdErr error var filerPwdErr error
shellOptions.FilerHost, shellOptions.FilerPort, shellOptions.Directory, filerPwdErr = parseFilerUrl(*shellInitialFilerUrl) shellOptions.FilerHost, shellOptions.FilerPort, shellOptions.Directory, filerPwdErr = parseFilerUrl(*shellInitialFilerUrl)
if filerPwdErr != nil { if filerPwdErr != nil {

4
weed/shell/commands.go

@ -16,8 +16,8 @@ import (
) )
type ShellOptions struct { type ShellOptions struct {
Masters *string
GrpcDialOption grpc.DialOption
Masters *string
GrpcDialOption grpc.DialOption
// shell transient context // shell transient context
FilerHost string FilerHost string
FilerPort int64 FilerPort int64

Loading…
Cancel
Save