Reorganize project into standard root layout
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/rcarmo/webterm-go-port/webterm"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := webterm.RunCLI(os.Args[1:]); err != nil {
|
||||
_, _ = fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMainVersionFlag(t *testing.T) {
|
||||
orig := os.Args
|
||||
defer func() { os.Args = orig }()
|
||||
os.Args = []string{"webterm", "-v"}
|
||||
main()
|
||||
}
|
||||
Reference in New Issue
Block a user