code: func (p *Project) LoadFunctionByPath(name, path string) (*function.Function, error) {
  	fn := &function.Function{
  		Config: function.Config{
  			Runtime:          p.Runtime,
  			Memory:           p.Memory,
  			Timeout:          p.Timeout,
  			Role:             p.Role,
  			Handler:          p.Handler,
  			Shim:             p.Shim,
  			Hooks:            p.Hooks,
  			Environment:      copyStringMap(p.Config.Environment),
  			RetainedVersions: p.RetainedVersions,
  			VPC:              copyVPC(p.VPC),
  			Zip:              p.Zip,
  		},
  		Name:       name,
  		Path:       path,
  		Log:        p.Log,
  		IgnoreFile: p.IgnoreFile,
  		Alias:      p.Alias,
  	}
  
  	if name, err := p.name(fn); err == nil {
  		fn.FunctionName = name
  	} else {
  		return nil, err
  	}
  
  	if err := fn.Open(p.Environment); err != nil {
  		return nil, err
  	}
  
  	fn.Service = p.ServiceProvider.NewService(fn.AWSConfig())
  
  	return fn, nil
  }
docs: // LoadFunctionByPath returns the function in the given directory.