gopkg.in/docker/libcompose.v0@v0.4.0/project/project_delete.go (about)

     1  package project
     2  
     3  import (
     4  	"golang.org/x/net/context"
     5  
     6  	"github.com/docker/libcompose/project/events"
     7  	"github.com/docker/libcompose/project/options"
     8  )
     9  
    10  // Delete removes the specified services (like docker rm).
    11  func (p *Project) Delete(ctx context.Context, options options.Delete, services ...string) error {
    12  	return p.perform(events.ProjectDeleteStart, events.ProjectDeleteDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) {
    13  		wrapper.Do(nil, events.ServiceDeleteStart, events.ServiceDelete, func(service Service) error {
    14  			return service.Delete(ctx, options)
    15  		})
    16  	}), nil)
    17  }