mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-28 04:10:09 +00:00
First commit
This commit is contained in:
25
third_party/github.com/fsouza/go-dockerclient/engine/hack.go
vendored
Normal file
25
third_party/github.com/fsouza/go-dockerclient/engine/hack.go
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright 2014 Docker authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the DOCKER-LICENSE file.
|
||||
|
||||
package engine
|
||||
|
||||
type Hack map[string]interface{}
|
||||
|
||||
func (eng *Engine) Hack_GetGlobalVar(key string) interface{} {
|
||||
if eng.hack == nil {
|
||||
return nil
|
||||
}
|
||||
val, exists := eng.hack[key]
|
||||
if !exists {
|
||||
return nil
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
func (eng *Engine) Hack_SetGlobalVar(key string, val interface{}) {
|
||||
if eng.hack == nil {
|
||||
eng.hack = make(Hack)
|
||||
}
|
||||
eng.hack[key] = val
|
||||
}
|
||||
Reference in New Issue
Block a user