diff --git a/src/pkg/Make.deps b/src/pkg/Make.deps index b58d2cc5f6..1241bb4797 100644 --- a/src/pkg/Make.deps +++ b/src/pkg/Make.deps @@ -41,7 +41,7 @@ path.install: strings.install rand.install: reflect.install: runtime.install strconv.install strings.install regexp.install: bytes.install container/vector.install io.install os.install runtime.install utf8.install -rpc.install: bufio.install gob.install http.install io.install log.install net.install os.install reflect.install strconv.install strings.install sync.install time.install unicode.install utf8.install +rpc.install: bufio.install gob.install http.install io.install log.install net.install os.install reflect.install strconv.install strings.install sync.install unicode.install utf8.install runtime.install: sort.install: strconv.install: bytes.install math.install os.install utf8.install diff --git a/src/pkg/exvar/exvar.go b/src/pkg/exvar/exvar.go index 6275e2d258..7849714978 100644 --- a/src/pkg/exvar/exvar.go +++ b/src/pkg/exvar/exvar.go @@ -162,6 +162,14 @@ func Get(name string) Var { return nil } +// RemoveAll removes all exported variables. +// This is for tests; don't call this on a real server. +func RemoveAll() { + mutex.Lock(); + defer mutex.Unlock(); + vars = make(map[string] Var); +} + // Convenience functions for creating new exported variables. func NewInt(name string) *Int {