Search Gear #7 – gocheck, gobyexample, toml-go!

Search Gear Notes

Search Gear Notes

Go, gocheck, gobyexample, toml-go

Thanks to @gniemeyer – gustavo @ who pointed me at so that I could understand receivers (which is the way go does methods).

Stumbled over closures – but put right by @mmcgrana

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 – 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…


Regular Expressions
#w4aYY = #w4a[4 digits][last 2 digits ]

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!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s