# What’s the purpose of the examples in the tpl package?

**URL:** <https://discourse.gohugo.io/t/what-s-the-purpose-of-the-examples-in-the-tpl-package/30905>\
**Category:** dev\
**Created:** [January 27, 2021, 8:05pm UTC](https://discourse.gohugo.io/t/what-s-the-purpose-of-the-examples-in-the-tpl-package/30905 "2021-01-27T20:05:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomclark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tomclark/32/13419_2.png) [@Tomclark](https://discourse.gohugo.io/u/Tomclark)\
**Post date:** [January 27, 2021, 8:05pm UTC](https://discourse.gohugo.io/t/what-s-the-purpose-of-the-examples-in-the-tpl-package/30905/1 "2021-01-27T20:05:42Z")

</div>

Hi there.

Just out of curiosity what’s utilising the examples shown in the tpl package under AddMethodMapping?

Many thanks.

---

<div class="post-metadata">

**Author:** ![moorereason](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/moorereason/32/592_2.png) [@moorereason](https://discourse.gohugo.io/u/moorereason)\
**Post date:** [January 27, 2021, 10:59pm UTC](https://discourse.gohugo.io/t/what-s-the-purpose-of-the-examples-in-the-tpl-package/30905/2 "2021-01-27T22:59:03Z")

</div>

They’re used by our [Go tests](https://github.com/gohugoio/hugo/blob/v0.80.0/tpl/tplimpl/template_funcs_test.go#L79) and included in the [docs.json](https://github.com/gohugoio/hugo/blob/v0.80.0/docs/data/docs.json#L2670) output generated for the docs site. The intent is to eventually incorporate the JSON data into the function docs…_somehow_. 🙂
