File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package cmd
22
33import (
4+ "errors"
5+
46 "github.com/spf13/cobra"
57 "github.com/kentaro-m/md2confl/utils/util"
68 "github.com/kentaro-m/md2confl/utils/file"
@@ -15,6 +17,11 @@ var copyCmd = &cobra.Command{
1517}
1618
1719func copy (cmd * cobra.Command , args []string ) error {
20+
21+ if len (args ) > 1 {
22+ return errors .New ("Too many arguments." )
23+ }
24+
1825 file := file.File {}
1926 if err := file .Open (args [0 ]); err != nil {
2027 return err
Original file line number Diff line number Diff line change 11package cmd
22
33import (
4+ "errors"
5+
46 "github.com/spf13/cobra"
57 "github.com/kentaro-m/md2confl/confluence"
68 "github.com/kentaro-m/md2confl/utils/file"
@@ -14,6 +16,11 @@ var previewCmd = &cobra.Command{
1416}
1517
1618func preview (cmd * cobra.Command , args []string ) error {
19+
20+ if len (args ) > 1 {
21+ return errors .New ("Too many arguments." )
22+ }
23+
1724 file := file.File {}
1825 if err := file .Open (args [0 ]); err != nil {
1926 return err
You can’t perform that action at this time.
0 commit comments