<commit_before>package volumeapi

import (
	"encoding/json"
	"fmt"
	"net/http"
)

const (
	defaultDockerRootDirectory    = "/var/lib/docker/volumes"
	defaultContentTypeV1          = "appplication/vnd.docker.plugins.v1+json"
	defaultImplementationManifest = `{"Implements": ["VolumeDriver"]}`
)

type VolumeRequest struct {
	Root string `json:",ommitempty"`
	Name string
}

type VolumeResponse struct {
	Mountpoint string
	Err        error
}

type VolumeDriver interface {
	Create(VolumeRequest) VolumeResponse
	Remove(VolumeRequest) VolumeResponse
	Path(VolumeRequest) VolumeResponse
	Mount(VolumeRequest) VolumeResponse
	Umount(VolumeRequest) VolumeResponse
}

type VolumeHandler struct {
	rootDirectory string
	handler       VolumeDriver
	mux           *http.ServeMux
}

type actionHandler func(VolumeRequest) VolumeResponse

func NewVolumeHandler(handler VolumeDriver) *VolumeHandler {<commit_msg>Fix omitempty typo.<commit_after>package volumeapi

import (
	"encoding/json"
	"fmt"
	"net/http"
)

const (
	defaultDockerRootDirectory    = "/var/lib/docker/volumes"
	defaultContentTypeV1          = "appplication/vnd.docker.plugins.v1+json"
	defaultImplementationManifest = `{"Implements": ["VolumeDriver"]}`
)

type VolumeRequest struct {
	Root string `json:",omitempty"`
	Name string
}

type VolumeResponse struct {
	Mountpoint string
	Err        error
}

type VolumeDriver interface {
	Create(VolumeRequest) VolumeResponse
	Remove(VolumeRequest) VolumeResponse
	Path(VolumeRequest) VolumeResponse
	Mount(VolumeRequest) VolumeResponse
	Umount(VolumeRequest) VolumeResponse
}

type VolumeHandler struct {
	rootDirectory string
	handler       VolumeDriver
	mux           *http.ServeMux
}

type actionHandler func(VolumeRequest) VolumeResponse

func NewVolumeHandler(handler VolumeDriver) *VolumeHandler {
{'fraction_non_alphanumeric': 0.08254847645429363, 'fraction_numerical': 0.00221606648199446, 'mean_word_length': 5.101351351351352, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6895733', 'n_tokens_mistral': 524, 'n_tokens_neox': 522, 'n_words': 120}