.. _example-go-app: Example Go app ============== This how-to guide covers the steps, decisions, and implementation details that are unique when crafting a Go-based snap. We'll work through the aspects unique to Go apps by examining an existing recipe. The process of developing a snap for a Go app builds on top of the standard Go compiler and configuration, making it possible to adapt or integrate an app's existing build tooling into the crafting process. Example recipe for woke ----------------------- The following code comprises the recipe of a Go project, `woke `_. This project is a text analysis tool that detects exclusive language. .. collapse:: woke recipe .. literalinclude:: ../code/craft-a-snap/example-go-recipe.yaml :language: yaml :lines: 3- Add a part written in Go ------------------------ .. literalinclude:: ../code/craft-a-snap/example-go-recipe.yaml :language: yaml :start-at: parts: Go parts are built with the `Go plugin `_. To declare a Go part: #. Declare the general part keys, such as ``source``, ``override-build``, ``build-packages``, and so on. #. Set ``plugin: go``. #. If necessary, you can override the Go compiler version by listing it in the ``build-snaps`` key, in the format ``go//``. The latest version is ``go/latest/stable``.