Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "ocr", Usage: "图片识别文字", Aliases: []string{"o"}, Flags: []cli.Flag{ &cli.StringFlag{ Name: "filename", Aliases: []string{"f"}, Usage: "图片文件名", Action: func(context *cli.Context, s string) error { if _, err := os.Stat(s); os.IsNotExist(err) { return fmt.Errorf("文件 %s 不存在,请重新选择文件", s) } ext := filepath.Ext(s) if common.Identify(ext) == false { return fmt.Errorf(common.ExtError) } return nil }, }, }, Action: Action, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.