// Put registers a PUT handler for the given path.
322776
func (h *Hitch) Put(path string, handler http.Handler, middleware ...func(http.Handler) http.Handler) {
	h.Handle("PUT", path, handler, middleware...)
}
1024106
func (f *FileManager) Put(b *posinfo.FilestoreNode) error {
	return f.putTo(b, f.ds)
}
1341175
func (d *Datastore) Put(key ds.Key, value []byte) (err error) {
	fn := d.KeyFilename(key)

	// mkdirall above.
	err = os.MkdirAll(filepath.Dir(fn), 0755)
	if err != nil {
		return err
	}

	return ioutil.WriteFile(fn, value, 0666)
}
892603
func (p *DocumentMatchPool) Put(d *DocumentMatch) {
	if d == nil {
		return
	}
	// reset DocumentMatch before returning it to available pool
	d.Reset()
	p.avail = append(p.avail, d)
}
1329798
func (g *Group) Put(path string, h HandlerFunc, opts ...HandlerOption) {
	g.add(path, h, opts, http.MethodPut)
}
633727
func (s *Server) Put(path string, h HandlerFunc, opts ...HandlerOption) {
	s.register(http.MethodPut, path, h, opts...)
}
18215
func (e *Expect) PUT(path string, pathargs ...interface{}) *Request {
	return e.Request("PUT", path, pathargs...)
}
171638
func (b *Batch) Put(key, value []byte) {
	b.appendRec(keyTypeVal, key, value)
}
670050
func (m *CouchDBBackend) Put(ctx context.Context, entry *physical.Entry) error {
	m.permitPool.Acquire()
	defer m.permitPool.Release()

	return m.PutInternal(ctx, entry)
}
271294
func (s *Sling) Put(pathURL string) *Sling {
	s.method = "PUT"
	return s.Path(pathURL)
}
311996
func (r *SubRouter) PUT(route string, handler interface{}) *SubRouter {
	route = r.prefixedRoute(route)
	if r.parent != nil {
		r.parent.handleReg(MethodPUT, route, handler, r.prefixes)
	}

	return r
}
1066090
func (s *encryptedKeyStorage) Put(ctx context.Context, entry *logical.StorageEntry) error {
	encPath, err := s.encryptPath(entry.Key)
	if err != nil {
		return err
	}
	e := &logical.StorageEntry{}
	*e = *entry

	e.Key = encPath

	return s.s.Put(ctx, e)
}
869323
func Put(url string, ro *RequestOptions) (*Response, error) {
	return DoRegularRequest("PUT", url, ro)
}
864384
func (app *App) PUT(route string, handler interface{}) *App {
	app.defaultRouter.Handle(MethodPUT, route, handler)
	return app
}
570933
func (s *DirectoryClient) Put(ctx context.Context, input *PutDirectoryInput) error {
	absPath := absFileInput(s.client.AccountName, input.DirectoryName)

	headers := &http.Header{}
	headers.Set("Content-Type", "application/json; type=directory")

	reqInput := client.RequestInput{
		Method:  http.MethodPut,
		Path:    string(absPath),
		Headers: headers,
	}
	respBody, _, err := s.client.ExecuteRequestStorage(ctx, reqInput)
	if respBody != nil {
		defer respBody.Close()
	}
	if err != nil {
		return errors.Wrap(err, "unable to put directory")
	}

	return nil
}
1251221
func (r *Router) Put(pattern string, handlers ...Middleware) *Router {
	return r.Handle(http.MethodPut, pattern, handlers...)
}
928574
func (store *FileStore) Put(key string, m packets.ControlPacket) {
	store.Lock()
	defer store.Unlock()
	chkcond(store.opened)
	full := fullpath(store.directory, key)
	if exists(full) {
		backup(store.directory, key) // make a copy of what already exists
		defer unbackup(store.directory, key)
	}
	write(store.directory, key, m)
	chkcond(exists(full))
}