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: diff_volume_servers.go
    path of file: ./repos/seaweedfs/unmaintained/diff_volume_servers
    
    the code of the file until where you have to start completion: package main

import (
	"bytes"
	"context"
	"errors"
	"flag"
	"fmt"
	"io"
	"math"
	"os"

	"github.com/seaweedfs/seaweedfs/weed/glog"
	"github.com/seaweedfs/seaweedfs/weed/operation"
	"github.com/seaweedfs/seaweedfs/weed/pb"
	"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
	"github.com/seaweedfs/seaweedfs/weed/security"
	"github.com/seaweedfs/seaweedfs/weed/storage/idx"
	"github.com/seaweedfs/seaweedfs/weed/storage/needle"
	"github.com/seaweedfs/seaweedfs/weed/storage/types"
	"github.com/seaweedfs/seaweedfs/weed/util"
	"google.golang.org/grpc"
)

var (
	serversStr       = flag.String("volumeServers", "", "comma-delimited list of volume servers to diff the volume against")
	volumeId         = flag.Int("volumeId", -1, "a volume id to diff from servers")
	volumeCollection = flag.String("collection", "", "the volume collection name")
	grpcDialOption   grpc.DialOption
)

/*
	Diff the volume's files across multiple volume servers.
	diff_volume_servers -volumeServers 127.0.0.1:8080,127.0.0.1:8081 -volumeId 5

	Example Output:
	reference 127.0.0.1:8081
	fileId volumeServer message
	5,01617c3f61 127.0.0.1:8080 wrongSize
*/
func main() {
	flag.Parse()

	util.LoadConfiguration("security", false)
	grpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client")

	vid := uint32(*volumeId)
	servers := pb.ServerAddresses(*serversStr).ToAddresses()
	if len(servers) < 2 {
		glog.Fatalf("You must specify more than 1 server\n")
	}
	var referenceServer pb.ServerAddr
    
func main() {
	flag.Parse()

	util.LoadConfiguration("security", false)
	grpcDialOption = security.LoadClientTLS(util.GetViper(), "grpc.client")

	vid := uint32(*volumeId)
	servers := pb.ServerAddresses(*serversStr).ToAddresses()
	if len(servers) < 2 {
		glog.Fatalf("You must specify more than 1 server\n")
	}
	var referenceServer pb.ServerAddress
	var maxOffset int64
	allFiles := map[pb.ServerAddress]map[types.NeedleId]needleState{}
	for _, addr := range servers {
		files, offset, err := getVolumeFiles(vid, addr)
		if err != nil {
			glog.Fatalf("Failed to copy idx from volume server %s\n", err)
		}
		allFiles[addr] = files
		if offset > maxOffset {
			referenceServer = addr
		}
	}

	same := true
	fmt.Println("reference", referenceServer)
	fmt.Println("fileId volumeServer message")
	for nid, n := range allFiles[referenceServer] {
		for addr, files := range allFiles {
			if addr == referenceServer {
				continue
			}
			var diffMsg string
			n2, ok := files[nid]
			if !ok {
				if n.state == stateDeleted {
					continue
				}
				diffMsg = "missing"
			} else if n2.state != n.state {
				switch n.state {
				case stateDeleted:
					diffMsg = "notDeleted"
				case statePresent:
					diffMsg = "deleted"
				}
			} else if n2.size != n.size {
				diffMsg = "wrongSize"
			} else {
				continue
			}
			same = false

			// fetch the needle details
			var id string
			var err error
			if n.state == statePresent {
				id, err = getNeedleFileId(vid, nid, referenceServer)
			} else {
				id, err = getNeedleFileId(vid, nid, addr)
			}
			if err != nil {
				glog.Fatalf("Failed to get needle info %d from volume server %s\n", nid, err)
			}
			fmt.Println(id, addr, diffMsg)
		}
	}
	if !same {
		os.Exit(1)
	}
}