Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Mod(r money.Resource, log *logrus.Logger, c *cli.Context) (bool, error) { t := r.(*money.Trades) id := int(util.Stf(c.Args().Get(0))) narg := c.NArg() narg -= 1 t.Pairs[id].Base = c.Args().Get(1) t.Pairs[id].Invs = c.Args().Get(2) t.Pairs[id].Cost = util.Stf(c.Args().Get(3)) t.Pairs[id].Amount = util.Stf(c.Args().Get(4)) t.Update() return true, nil }
func mod(t *money.Trades, id int, field string, val string) {
switch field { case "base": t.Open[id].Base = val case "invs": t.Open[id].Invs = val case "amount": t.Open[id].Amount = util.Stf(val) case "cost": t.Open[id].Cost = util.Stf(val) case "dir": if val == "buy" { t.Open[id].Claim = false } else { t.Open[id].Claim = true } } }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.