You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: main.go
    path of file: ./repos/vuvuzela/cmd/vuvuzela-coordinator
    
    the code of the file until where you have to start completion: // Copyright 2016 David Lazar. All rights reserved.
// Use of this source code is governed by the GNU AGPL
// license that can be found in the LICENSE file.

package main

import (
	"flag"
	"fmt"
	"io/ioutil"
	"net/http"
	"os"
	"path/filepath"
	"strings"

	"vuvuzela.io/alpenhorn/cmd/cmdutil"
	"vuvuzela.io/alpenhorn/config"
	"vuvuzela.io/alpenhorn/edtls"
	"vuvuzela.io/alpenhorn/encoding/toml"
	"vuvuzela.io/alpenhorn/log"
	"vuvuzela.io/vuvuzela/cmd/cmdconf"
	"vuvuzela.io/vuvuzela/coordinator"
	"vuvuzela.io/vuvuzela/internal/vzlog"
)

var (
	doInit      = flag.Bool("init", false, "initialize a coordinator for the first time")
	persistPath = flag.String("persist", "p
    
func main() {
	flag.Parse()

	err := os.MkdirAll(*persistPath, 0700)
	if err != nil {
		log.Fatal(err)
	}
	confPath := filepath.Join(*persistPath, "coordinator.conf")

	if *doInit {
		initCoordinator(confPath)
		return
	}

	data, err := ioutil.ReadFile(confPath)
	if err != nil {
		log.Fatal(err)
	}
	conf := new(cmdconf.CoordinatorConfig)
	err = toml.Unmarshal(data, conf)
	if err != nil {
		log.Fatalf("error parsing config %s: %s", confPath, err)
	}

	logsDir := filepath.Join(*persistPath, "logs")
	logHandler, err := vzlog.NewProductionOutput(logsDir)
	if err != nil {
		log.Fatal(err)
	}

	convoPresistPath := filepath.Join(*persistPath, "convo-coordinator-state")
	convoServer := &coordinator.Server{
		Service:    "Convo",
		PrivateKey: conf.PrivateKey,

		ConfigClient: config.StdClient,

		RoundDelay: conf.RoundDelay,

		PersistPath: convoPresistPath,
	}
	err = convoServer.LoadPersistedState()
	if err != nil {
		log.Fatalf("error loading persisted state: %s", err)
	}

	http.Handle("/convo/", http.StripPrefix("/convo", convoServer))

	listener, err := edtls.Listen("tcp", conf.ListenAddr, conf.PrivateKey)
	if err != nil {
		log.Fatalf("edtls listen: %s", err)
	}

	log.Infof("Listening on %q; logging to %s", conf.ListenAddr, logHandler.Name())
	log.StdLogger.EntryHandler = logHandler
	log.Infof("Listening on %q", conf.ListenAddr)

	err = convoServer.Run()
	if err != nil {
		log.Fatalf("error starting convo loop: %s", err)
	}
	err = http.Serve(listener, nil)
	if err != nil {
		log.Fatal(err)
	}
}