Skip to content

Commit

Permalink
Merge pull request #47 from equal-l2/fix-typo
Browse files Browse the repository at this point in the history
fix: fix typo
  • Loading branch information
earlgray283 authored Apr 19, 2021
2 parents 459783b + b23c8ef commit c40827a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *Client) downloadFile(reqURL, fileName, dirPath string, params *url.Valu
if bytes.Contains(htmlBytes, []byte(fileNotFoundMessage)) {
file.Close()
os.Remove(savePath)
return fmt.Errorf("File does not found. You may wrong the argument `path` or `volume`.")
return fmt.Errorf("The file could not be found. The argument `path` or `volume` may be wrong.")
}
}

Expand Down
2 changes: 1 addition & 1 deletion api/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func findSegmentLines(doc *goquery.Document) ([]*SegmentInfo, error) {

selection := doc.Find("table#table_wfb_5 > tbody > script")
if selection.Length() == 0 {
return nil, errors.New("Maybe you failed to write directory's name, or this directory hasn't data!!!")
return nil, errors.New("the directory name is wrong, or the directory have no data")
}

lines := strings.Split(selection.Text()[1:], ";\n")
Expand Down
2 changes: 1 addition & 1 deletion pkg/subcmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewDownloadCmd() *cobra.Command {
},
}

cmd.Flags().StringVarP(&savePath, "output", "o", ".", "a path which saves downloaded file")
cmd.Flags().StringVarP(&savePath, "output", "o", ".", "a path for saving downloaded files")
cmd.Flags().StringVarP(&volumeName, "volume", "v", api.VolumeNameFSShare, "volume id [fsshare / fs]")

return cmd
Expand Down
4 changes: 2 additions & 2 deletions pkg/subcmd/find.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func NewFindCmd() *cobra.Command {

cmd.Flags().StringVarP(&volumeName, "volume", "v", api.VolumeNameFSShare, "volume id [fsshare / fs]")
cmd.Flags().BoolVarP(&recursiveFlg, "recursive", "r", false, "recursively search files or directories")
cmd.Flags().StringVar(&namePattern, "name", "", "pattern of file or directory name")
cmd.Flags().StringVar(&pathPattern, "path", "", "pattern of file or directory's path")
cmd.Flags().StringVar(&namePattern, "name", "", "pattern for name of files or directories")
cmd.Flags().StringVar(&pathPattern, "path", "", "pattern for path of files or directories")

return cmd
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/subcmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ func NewListCmd() *cobra.Command {
},
Args: func(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return errors.New("write the path to place that you wnat to see all files and folders")
return errors.New("write the path to place that you want to see all files and folders")
}

return nil
},
}

cmd.Flags().StringVarP(&volumeName, "volume", "v", api.VolumeNameFSShare, "volume id [fsshare / fs]")
cmd.Flags().BoolVar(&showPathFlg, "path", false, "show segment's path")
cmd.Flags().BoolVar(&jsonFlg, "json", false, "show segments with json format")
cmd.Flags().BoolVar(&showPathFlg, "path", false, "show path of segment")
cmd.Flags().BoolVar(&jsonFlg, "json", false, "show segments in json format")

return cmd
}
Expand Down
1 change: 1 addition & 0 deletions pkg/subcmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func NewLoginCmd() *cobra.Command {
cmd.SetOut(os.Stderr)

client := api.NewClient()

if ok := client.CheckCookies(); ok {
yes, err := util.InputYN("You seem to have already logined. Do you want to login again?[Y/n] ")
if err != nil {
Expand Down

0 comments on commit c40827a

Please sign in to comment.