code: func GetEntrypoint(artifacts []*ct.Artifact, typ string) *ct.ImageEntrypoint {
  	for i := len(artifacts) - 1; i >= 0; i-- {
  		artifact := artifacts[i]
  		if artifact.Type != ct.ArtifactTypeFlynn {
  			continue
  		}
  		if e, ok := artifact.Manifest().Entrypoints[typ]; ok {
  			return e
  		}
  	}
  	for i := len(artifacts) - 1; i >= 0; i-- {
  		artifact := artifacts[i]
  		if artifact.Type != ct.ArtifactTypeFlynn {
  			continue
  		}
  		if e := artifact.Manifest().DefaultEntrypoint(); e != nil {
  			return e
  		}
  	}
  	return nil
  }
docs: // GetEntrypoint returns an image entrypoint for a process type from a list of
  // artifacts, first iterating through them and returning any entrypoint having
  // the exact type, then iterating through them and returning the artifact's
  // default entrypoint if it has one.
  //
  // The artifacts are traversed in reverse order so that entrypoints in the
  // image being overlayed at the top are considered first.