From 575dd002be18f170917a98f8bca891b4bd615f78 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Fri, 21 Sep 2012 13:03:46 +0200 Subject: basic octopart pricing functionality --- bommom.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bommom.go') diff --git a/bommom.go b/bommom.go index 55071b8..cebff62 100644 --- a/bommom.go +++ b/bommom.go @@ -28,6 +28,7 @@ var ( listenPort = flag.Uint("port", 7070, "port to listen on (HTTP serve)") listenHost = flag.String("host", "", "hostname to listen on (HTTP serve)") sessionSecret = flag.String("sessionSecret", "12345", "cookie session secret") + octoApiKey = flag.String("octopartApiKey", "", "octopart.com API key (for pricing info)") ) func main() { @@ -88,6 +89,10 @@ func openAuthStore() { auth = DummyAuth(true) } +func openPricingSource() { + pricingSource = NewOctopartClient(*octoApiKey) +} + func dumpOut(fname string, bm *BomMeta, b *Bom) { var outFile io.Writer if fname == "" { -- cgit v1.2.3