Search Gear #6 – Spew, Hopwatch, toml-go!

Search Gear Notes

Search Gear Notes

Go, Spew, Hopwatch, toml-go


hopwatch uses go-spew Dump and Dumpf

Both are good and seem useful.

go-toml-config does not work and the documentation is wrong. Persistently get ‘panic: myconfig.conf is not a valid TOML file. See’ even when it’s the test file from

package main

import ""

var (
title= config.String("title", "Unknown")
name = config.String("", "")
git = config.String("owner.GitHub", "")
bio = config.String("", "")

enabled = config.Bool("owner.enabled", false)
connection_max = config.Int("owner.connection_max", 0)


func main() {

if err := config.Parse("myconfig.conf"); err != nil {


viper over a TOML file gives
go run searchgear.go
(viper.UnsupportedConfigError) Unsupported Config Type “”
(string) “”

adding filename extension to be the language ie myconfig.conf becomes myconfig.toml has an effect but still empty variables


package main

import (

var parser toml.Parser

func main() {

doc := parser.ParseFile("myconfig.toml")


go run searchgear.go
(string) (len=18) “Tom Preston-Werner”

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 )

Google photo

You are commenting using your Google 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