code: func (p *Project) LoadFunctions(patterns ...string) error {
  	dir := filepath.Join(p.Path, functionsDir)
  	p.Log.Debugf("loading functions in %s", dir)
  
  	names, err := p.FunctionDirNames()
  	if err != nil {
  		return err
  	}
  
  	for _, name := range names {
  		match, err := matches(name, patterns)
  		if err != nil {
  			return errors.Wrapf(err, "matching %s", name)
  		}
  
  		if !match {
  			continue
  		}
  
  		fn, err := p.LoadFunction(name)
  		if err != nil {
  			return errors.Wrapf(err, "loading %s", name)
  		}
  
  		p.Functions = append(p.Functions, fn)
  	}
  
  	if len(p.Functions) == 0 {
  		return errors.New("no function loaded")
  	}
  
  	return nil
  }
docs: // LoadFunctions reads the ./functions directory, populating the Functions field.
  // If no `patterns` are specified, all functions are loaded.