diff options
| author | Tong Sun <[email protected]> | 2020-07-26 00:15:49 -0400 |
|---|---|---|
| committer | Tong Sun <[email protected]> | 2020-07-26 00:15:49 -0400 |
| commit | fffbe38292c5d0a68f8e472e27a3fffd089b2ed6 (patch) | |
| tree | f7b7dbb650749ad9caffd845e433d6aa24b45a5a | |
| parent | - [+] add the initial wireframe (diff) | |
| download | html2md-fffbe38292c5d0a68f8e472e27a3fffd089b2ed6.tar.xz html2md-fffbe38292c5d0a68f8e472e27a3fffd089b2ed6.zip | |
- [+] refactor func html2md() to prop_html2md.go
| -rw-r--r-- | html2md_main.go | 11 | ||||
| -rw-r--r-- | prop_html2md.go | 24 |
2 files changed, 24 insertions, 11 deletions
diff --git a/html2md_main.go b/html2md_main.go index 23f5c03..40309f3 100644 --- a/html2md_main.go +++ b/html2md_main.go @@ -71,14 +71,3 @@ func main() { } fmt.Println("") } - -//========================================================================== -// Dumb root handler - -func html2md(ctx *cli.Context) error { - ctx.JSON(ctx.RootArgv()) - ctx.JSON(ctx.Argv()) - fmt.Println() - - return nil -} diff --git a/prop_html2md.go b/prop_html2md.go new file mode 100644 index 0000000..838122e --- /dev/null +++ b/prop_html2md.go @@ -0,0 +1,24 @@ +//////////////////////////////////////////////////////////////////////////// +// Program: html2md +// Purpose: HTML to Markdown +// Authors: Tong Sun (c) 2020, All rights reserved +//////////////////////////////////////////////////////////////////////////// + +package main + +import ( + "fmt" + + "github.com/mkideal/cli" +) + +//========================================================================== +// root handler + +func html2md(ctx *cli.Context) error { + ctx.JSON(ctx.RootArgv()) + ctx.JSON(ctx.Argv()) + fmt.Println() + + return nil +} |