func deleteContainer(ctx context.Context, client containerd.Client, name string) error {
	container, err := client.LoadContainer(ctx, name)
	if err != nil {
		return err
	}
	return container.Delete(ctx, containerd.WithSnapshotCleanup)
}
deleteContainer will remove a container
package main
import (
	"bufio"
	"context"
	"fmt"
	"os"
	"strings"
	"syscall"
	"github.com/containerd/containerd"
	"github.com/containerd/containerd/containers"
	"github.com/containerd/containerd/oci"
	specs "github.com/opencontainers/runtime-spec/specs-go"
	log "github.com/sirupsen/logrus"
)
func stopContainer(ctx context.Context, client containerd.Client, name string) error {
	container, err := client.LoadContainer(ctx, name)
	if err != nil {
		return err
	}
	if err = stopTask(ctx, container); err != nil {
		if !strings.Contains(err.Error(), "not found") {
			return err
		}
	}
	return nil
}