github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/apiserver/machinemanager/export_test.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package machinemanager
     5  
     6  import "github.com/juju/juju/state"
     7  
     8  type StateInterface stateInterface
     9  
    10  type Patcher interface {
    11  	PatchValue(ptr, value interface{})
    12  }
    13  
    14  func PatchState(p Patcher, st StateInterface) {
    15  	p.PatchValue(&getState, func(*state.State) stateInterface {
    16  		return st
    17  	})
    18  }