refactor: improve session action handling in play_core
- Clean up `play_core` by removing dead code and unused imports - Check `action.name` directly instead of param existence - Allow 'value' as an alias for 'val' in session env actions - Use `env_set` for `env_set_once` to avoid duplicate errors
This commit is contained in:
@@ -77,7 +77,6 @@ pub fn (mut self Session) env_set_once(key string, value string) ! {
|
||||
self.env_set(key, value)!
|
||||
}
|
||||
|
||||
|
||||
// Get an environment variable
|
||||
pub fn (mut self Session) env_get(key string) !string {
|
||||
return self.env[key] or { return error("can't find env in session ${self.name}") }
|
||||
|
||||
Reference in New Issue
Block a user