// Delete removes a dashboard file from the directory
338235
func (d *Dashboards) Delete(ctx context.Context, dashboard chronograf.Dashboard) error {
	_, file, err := d.idToFile(dashboard.ID)
	if err != nil {
		return err
	}

	if err := d.Remove(file); err != nil {
		d.Logger.
			WithField("component", "dashboard").
			WithField("name", file).
			Error("Unable to remove dashboard:", err)
		return err
	}
	return nil
}
269353
func (d *driver) Delete(ctx context.Context, subPath string) error {
	fullPath := d.fullPath(subPath)

	_, err := os.Stat(fullPath)
	if err != nil && !os.IsNotExist(err) {
		return err
	} else if err != nil {
		return storagedriver.PathNotFoundError{Path: subPath}
	}

	err = os.RemoveAll(fullPath)
	return err
}
593398
func (rt *Router) Delete(path string, handler http.Handler) {
	rt.Handle(http.MethodDelete, path, handler)
}
475599
func (s *SourcesStore) Delete(ctx context.Context, src chronograf.Source) error {
	return s.DeleteF(ctx, src)
}
574660
func (s *redisStorage) Delete(key string) error {
	cmd := s.c.Del(key)
	return cmd.Err()
}
685069
func (s *GeoDirectionalPoolsService) Delete(k GeoDirectionalPoolKey) (*http.Response, error) {
	return s.client.delete(k.URI(), nil)
}
882527
func (s *Store) Delete(ctx context.Context, path string) error {
	_, err := s.api.Logical().Delete(path)
	return err
}
1173943
func (m *dirsMap) Delete(key string) {
	m.data.Delete(m.normalizeKey(key))
}
119734
func (e *Echo) DELETE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route {
	return e.Add(http.MethodDelete, path, h, m...)
}
70345
func (cf *Filter) Delete(data []byte) bool {
	i1, i2, fp := getIndicesAndFingerprint(data, uint(len(cf.buckets)))
	return cf.delete(fp, i1) || cf.delete(fp, i2)
}
781409
func (g *GcsFS) Delete(ctx context.Context, obj string) error {
	err := g.gcsb().Object(obj).Delete(ctx)
	if err != nil {
		return err
	}
	return nil
}
392547
func (res *Resource) Delete(storage store.Delete) {
	res.HandleFuncC(
		pat.Delete(patID),
		func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
			res.deleteHandler(ctx, w, r, storage)
		},
	)

	res.addRoute(delete, patID)
}
1096567
func (t *Tombstoner) Delete() error {
	t.mu.Lock()
	defer t.mu.Unlock()
	if err := os.RemoveAll(t.tombstonePath()); err != nil {
		return err
	}
	t.statsLoaded = false
	t.lastAppliedOffset = 0

	return nil
}
84459
func (rw *GCS) Delete(id string) error {
	ctx := context.Background()
	obj := rw.bucket.Object(rw.Prefixed.Name(id))
	return obj.Delete(ctx)
}
1022462
func (s *FileSystemStorage) Delete(filepath string) error {
	return os.Remove(s.Path(filepath))
}
588241
func (img *Image) Delete() error {
	dc, err := getDockerClient()
	if err != nil {
		return err
	}
	return dc.RemoveImage(img.ID.String())
}
397498
func (multi *DashboardsStore) Delete(ctx context.Context, dashboard chronograf.Dashboard) error {
	var err error
	for _, store := range multi.Stores {
		err = store.Delete(ctx, dashboard)
		if err == nil {
			return nil
		}
	}
	return err
}