~juju-qa/ubuntu/trusty/juju/juju-1.25.8

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/apiserver/cleaner/export_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-12-02 18:01:10 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161202180110-dl1helep8qfebmhx
ImportĀ upstreamĀ 1.25.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2015 Canonical Ltd.
 
2
// Licensed under the AGPLv3, see LICENCE file for details.
 
3
 
 
4
package cleaner
 
5
 
 
6
import (
 
7
        "github.com/juju/juju/state"
 
8
)
 
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
}