O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The anatomy of a cog

For the IGWEB project, we will be creating cogs in the $IGWEB_APP_ROOT/shared/cogs folder. You can take a peek at the time ago cog, whose implementation is found in the $IGWEB_APP_ROOT/shared/cogs/timeago folder, as you read through this section, to see a tangible implementation of the concepts presented herein. 

For the purposes of illustration only, we are going to walk you through the process of creating a simple cog called widget.

The project structure for the widget cog contained within the widget folder is organized in the following manner:

  ⁃ widget    ⁃ widget.go    ⁃ templates    ⁃ widget.tmpl

The widget.go source file will contain the implementation for the widget cog.

The templates folder contains the template source ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required