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: finder.go
    path of file: ./repos/ksync/pkg/cli
    
    the code of the file until where you have to start completion: package cli

import (
	"fmt"
)

// FinderCmd parses the options required to discover a 
    
func (cmd *FinderCmd) Validator() error {
	// TODO: something like cmdutil.UsageErrorf
	// TODO: move into its own function (add to command as a validator?)
	if cmd.Viper.GetStringSlice("selector") == nil && cmd.Viper.GetString("pod") == "" {
		return fmt.Errorf("must specify at least a selector or a pod name")
	}

	// Check that both ends of a sync are not read only
	if cmd.Viper.GetBool("local-read-only") && cmd.Viper.GetBool("remote-read-only") {
		return fmt.Errorf("only one end of a sync can be read only")
	}

	return nil
}