with

package
v0.0.0-...-654a8ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package with contains context managers for objects that require initialization before and clean-up after the execution such as files, locks, connections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Closer

func Closer(c io.Closer, fn func() error) (err error)

func Lock

func Lock(l sync.Locker, fn func() error) (err error)

func ReadLock

func ReadLock(l ReadLocker, fn func() error) (err error)

Types

type ReadLocker

type ReadLocker interface {
	RLocker() sync.Locker
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL