github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/watcher/legacy/export_test.go (about)

     1  // Copyright 2012-2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package legacy
     5  
     6  import (
     7  	"github.com/juju/juju/state/watcher"
     8  )
     9  
    10  func SetEnsureErr(f func(watcher.Errer) error) {
    11  	if f == nil {
    12  		ensureErr = watcher.EnsureErr
    13  	} else {
    14  		ensureErr = f
    15  	}
    16  }
    17  
    18  func EnsureErr() func(watcher.Errer) error {
    19  	return ensureErr
    20  }