Closed collinglass closed 9 years ago
There are cases where one might want to do the following:
var ns *reddit.NewSubmission switch t.Type { case "link": ns = reddit.NewLinkSubmission(t.SubReddit, t.Title, t.Url, true, nil) case "text": ns = reddit.NewTextSubmission(t.SubReddit, t.Title, t.Text, true, nil) default: return }
Good point! Thanks for the contribution!
No problem, thanks for the prompt response
There are cases where one might want to do the following: