Move logic to separate package
This commit is contained in:
parent
ed08bb79a2
commit
cc261742fc
14
main.go
Normal file
14
main.go
Normal 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"))
|
||||
}
|
@ -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
|
Loading…
Reference in New Issue
Block a user