func parseObjectSpec(spec *spec, main string) error {
	e, _ := parser.ParseExpr(main)
	if pkg := parseImportPath(e); pkg != "" {
		spec.pkg = pkg
		if spec.searchFor == "" {
			return fmt.Errorf("-from %q: package import path %q must have a ::name suffix",
				main, main)
		}
		return nil
	}
	if e, ok := e.(*ast.SelectorExpr); ok {
		x := unparen(e.X)
		if star, ok := x.(*ast.StarExpr); ok {
			x = star.X
		}
		if pkg := parseImportPath(x); pkg != "" {
			spec.pkg = pkg               
			spec.pkgMember = e.Sel.Name  
			spec.fromName = e.Sel.Name
			return nil
		}
		if x, ok := x.(*ast.SelectorExpr); ok {
			y := unparen(x.X)
			if pkg := parseImportPath(y); pkg != "" {
				spec.pkg = pkg                
				spec.pkgMember = x.Sel.Name   
				spec.typeMember = e.Sel.Name  
				spec.fromName = e.Sel.Name
				return nil
			}
		}
	}
	return fmt.Errorf("-from %q: invalid expression", main)
}
parseObjectSpec parses main as one of the non-filename forms of
object specification.
package main
import (
	"bytes"
	"fmt"
	"go/ast"
	"go/build"
	"go/parser"
	"go/token"
	"go/types"
	"log"
	"os"
	"path/filepath"
	"regexp"
	"strconv"
	"strings"
	"golang.org/x/tools/go/buildutil"
	"golang.org/x/tools/go/loader"
)
type spec struct {
	pkg string
	fromName string
	searchFor string
	pkgMember string
	typeMember string
	filename string
	offset int
}
func parseFromFlag(ctxt *build.Context, fromFlag string) (*spec, error) {
	var spec spec
	var main string  
	switch parts := strings.Split(fromFlag, "::"); len(parts) {
	case 1:
		main = parts[0]
	case 2:
		main = parts[0]
		spec.searchFor = parts[1]
		if parts[1] == "" {
		}
	default:
		return nil, fmt.Errorf("-from %q: invalid identifier specification (see -help for formats)", fromFlag)
	}
	if strings.HasSuffix(main, ".go") {
		if spec.searchFor == "" {
			return nil, fmt.Errorf("-from: filename %q must have a ::name suffix", main)
		}
		spec.filename = main
		if !buildutil.FileExists(ctxt, spec.filename) {
			return nil, fmt.Errorf("no such file: %s", spec.filename)
		}
		bp, err := buildutil.ContainingPackage(ctxt, wd, spec.filename)
		if err != nil {
			return nil, err
		}
		spec.pkg = bp.ImportPath
	} else {
		if err := parseObjectSpec(&spec, main); err != nil {
			return nil, err
		}
	}
	if spec.searchFor != "" {
		spec.fromName = spec.searchFor
	}
	cwd, err := os.Getwd()
	if err != nil {
		return nil, err
	}
	bp, err := ctxt.Import(spec.pkg, cwd, build.FindOnly)
	if err != nil {
		return nil, fmt.Errorf("can't find package %q", spec.pkg)
	}
	spec.pkg = bp.ImportPath
	if !isValidIdentifier(spec.fromName) {
		return nil, fmt.Errorf("-from: invalid identifier %q", spec.fromName)
	}
	if Verbose {
		log.Printf("-from spec: %+v", spec)
	}
	return &spec, nil
}