code: func getDepList(ctx *cli.Context, target, pkgPath, vendor string) ([]string, error) {
  	vendorSrc := path.Join(vendor, "src")
  	rootPath := doc.GetRootPath(target)
  	// If work directory is not in GOPATH, then need to setup a vendor path.
  	if !setting.HasGOPATHSetting || !strings.HasPrefix(pkgPath, setting.InstallGopath) {
  		// Make link of self.
  		log.Debug("Linking %s...", rootPath)
  		from := pkgPath
  		to := path.Join(vendorSrc, rootPath)
  		if setting.Debug {
  			log.Debug("Linking from %s to %s", from, to)
  		}
  		if err := autoLink(from, to); err != nil {
  			return nil, err
  		}
  	}
  
  	imports, err := doc.ListImports(target, rootPath, vendor, pkgPath, ctx.String("tags"), ctx.Bool("test"))
  	if err != nil {
  		return nil, err
  	}
  
  	list := make([]string, 0, len(imports))
  	for _, name := range imports {
  		name = doc.GetRootPath(name)
  		if !base.IsSliceContainsStr(list, name) {
  			list = append(list, name)
  		}
  	}
  	sort.Strings(list)
  	return list, nil
  }
docs: // getDepList gets list of dependencies in root path format and nature order.