Move logic to separate package

This commit is contained in:
Kristóf Tóth 2019-04-06 01:02:12 +02:00
parent ed08bb79a2
commit cc261742fc
2 changed files with 15 additions and 6 deletions

14
main.go Normal file
View File

@ -0,0 +1,14 @@
package main
import (
"./trans"
"os"
"fmt"
"strings"
)
func main() {
results := trans.New(os.Args[1], "en", "hu").Translate()
fmt.Println(strings.Join(results, "\n"))
}

View File

@ -1,17 +1,12 @@
package main
package trans
import (
"fmt"
"os"
"os/exec"
"strings"
"log"
)
func main() {
results := New(os.Args[1], "en", "hu").Translate()
fmt.Println(strings.Join(results, "\n"))
}
type transJob struct {
word string