Feature/commands (#18)

* re-organized command structure
* added 'dup' command
This commit is contained in:
T.v.Dein
2023-11-12 20:29:10 +01:00
committed by GitHub
parent 0782b0920b
commit 2f56761bf1
6 changed files with 310 additions and 82 deletions

View File

@@ -33,6 +33,15 @@ func contains(s []string, e string) bool {
return false
}
func exists(m map[string]interface{}, item string) bool {
// FIXME: try to use this for all cases
if _, ok := m[item]; ok {
return true
}
return false
}
func const2num(name string) float64 {
switch name {
case "Pi":