Go, gocheck, gobyexample, toml-go
Stumbled over closures – but put right by @mmcgrana https://gobyexample.com/closures
Alright now it’s time to get started – but I think I’ll use the vanilla go testing framework to start with.
So initially (see Day 5): I need to
Consider i18n and a user file to drive the user config.
Pull in the API keys from the config,
pull in the hashtags that might be useful
This suggests an initial structure for the config file – and with reference to twitter.
So something in TOML (Tom’s Obvious, Minimal Language – https://github.com/toml-lang/toml) might be
config for the searchgear application
twitter-key = “” # Should this just be Hard coded I wonder
twitter-secret = “” # Should this just be Hard coded I wonder, not very secret in the config file.
start-at = 00 # When should an email be sent – the 24h cycle is implicit – eventually these episodes will need connecting for better summarisation.
config for twitter
user-key = “”
user-secret = “”
specific-users = [
] # Need this if we want all tweets from an individuals to be summarised separately.
specific-tags = [
“#w4aYY” #catch yearly events without specifying – will need to implement / pass to a regex parser.
] # Need this if we want all tweets from a tag to be summarised separately.
config for other APIs…
So other things to consider is that each config search API parameters will have a critical error flag which if present will skip searchgear using that API.
now the code which ran OK on Friday is not running today – many go errors! Reboot for tomorrow – but why? Well the notes have already proved useful to backtrack working examples!