cachegen

command module
v0.0.0-...-dfff8c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2015 License: MIT Imports: 10 Imported by: 0

README

cachegen Build Status

Uses "go generate" to convert the expiration cache template to a cache that works for your package.

Installation

Run

go get github.com/zabawaba99/cachegen
Usage

In order to generate a new cache you must specify the type key and value to cache in the comments in your code:

//go:generate cachegen -key-type int -value-type MyStruct

This will create a new MyStructCache type that will allow you to Add, Get and Expire MyStruct objects using an int. The file will be called mystruct_cache.go

Note: The cache type and all it's functions are currently exported.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b new-feature)
  3. Commit your changes (git commit -am 'awesome things with tests')
  4. Push to the branch (git push origin new-feature)
  5. Create new Pull Request

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL