This refactors the engine so all of the APIs on it are instance methods on the type instead of raw methods that float around and use data from a global engine. A mechcanical change as we remove the global `E` and then make anything that interacted with that in pkg/engine to be an instance method and the dealing with the fallout.
12 lines
161 B
Go
12 lines
161 B
Go
package engine
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func (eng *Engine) GetCurrentEnv() error {
|
|
if name := eng.getCurrentEnv(); name != "" {
|
|
fmt.Println(name)
|
|
}
|
|
return nil
|
|
}
|