github.com/eatbyte/docker@v1.6.0/engine/hack.go (about)

     1  package engine
     2  
     3  type Hack map[string]interface{}
     4  
     5  func (eng *Engine) Hack_GetGlobalVar(key string) interface{} {
     6  	if eng.hack == nil {
     7  		return nil
     8  	}
     9  	val, exists := eng.hack[key]
    10  	if !exists {
    11  		return nil
    12  	}
    13  	return val
    14  }
    15  
    16  func (eng *Engine) Hack_SetGlobalVar(key string, val interface{}) {
    17  	if eng.hack == nil {
    18  		eng.hack = make(Hack)
    19  	}
    20  	eng.hack[key] = val
    21  }