Scanning words in a text file by Golang

I want to split a text file(file.txt) into two separate equal size texts files such as file1.txt and file2.txt. My strategy in the split is to scan words and count them and then write the first half of the words to file1.txt and the rest to file2.txt. This is the code:

package main
import (
func main() {
func WordbyWordScan() {
    file, err := os.Open("file.txt.txt")
    if err != nil {
    defer file.Close()
    scanner := bufio.NewScanner(file)
    count := 0
    for scanner.Scan() {
    if err := scanner.Err(); err != nil {
    fmt.Printf("%d\n", count)

As far as I can guess scanner.Scan() returns a boolean. After counting the number of words, How I can implement such a code in Golang that states write the first half of words to file1.txt and the rest in file2.txt?