My question is why does this work:
switch {
case cfg.PlayNew.TreeReportingOptions.Type == "very narrow":
treeMoveWidth = 1
case cfg.PlayNew.TreeReportingOptions.Type == "narrow":
treeMoveWidth = 3
case cfg.PlayNew.TreeReportingOptions.Type == "regular":
treeMoveWidth = 8
}
BUT this does not??? Note: cfg.PlayNew.TreeReportingOptions.Type is a string
switch cfg.PlayNew.TreeReportingOptions.Type {
case "very narrow":
treeMoveWidth = 1
case "narrow":
treeMoveWidth = 3
case "regular":
treeMoveWidth = 8
}
Thank you for your time!