github.com/rohankumardubey/draft-classic@v0.16.0/pkg/draft/manifest/load.go (about)

     1  package manifest
     2  
     3  import (
     4  	"github.com/BurntSushi/toml"
     5  )
     6  
     7  // Load opens the named file for reading. If successful, the manifest is returned.
     8  func Load(name string) (*Manifest, error) {
     9  	mfst := New()
    10  	if _, err := toml.DecodeFile(name, mfst); err != nil {
    11  		return nil, err
    12  	}
    13  	return mfst, nil
    14  }