# How to use GO inside HUGO

**URL:** <https://discourse.gohugo.io/t/how-to-use-go-inside-hugo/31314>\
**Category:** support\
**Created:** [February 19, 2021, 4:20pm UTC](https://discourse.gohugo.io/t/how-to-use-go-inside-hugo/31314 "2021-02-19T16:20:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomkonidas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tomkonidas/32/13652_2.png) [@tomkonidas](https://discourse.gohugo.io/u/tomkonidas)\
**Post date:** [February 19, 2021, 4:20pm UTC](https://discourse.gohugo.io/t/how-to-use-go-inside-hugo/31314/1 "2021-02-19T16:20:57Z")

</div>

Hello everyone,

I was wondering how to use some GO within HUGO, perhaps maybe within the template? Or to import it as. module and call it as a function perhaps? I am not quite sure TBH.

The issue is I need to call an http get request, but I need to pass some headers, and I am aware of the current limitations, so I thought I would just opt in to write some custom code with the `net/http` package. I am just unaware of how/where to place it and how to call it within the project.

I don’t code in GO, but I am a developer (Mainly Elixir) and looking at the docs, it seems fairly simple. I can get the basics running on its own, I just need some guidance on the integration.

This is my first post! 🙂 So far I am liking HUGO (Coming from 11ty, Gatsby, Next, Nuxt). I am just missing the features of being Ableton implement my own code when the tools are not provided

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [February 19, 2021, 4:47pm UTC](https://discourse.gohugo.io/t/how-to-use-go-inside-hugo/31314/2 "2021-02-19T16:47:45Z")

</div>

> [@tomkonidas](#):
>
> I was wondering how to use some GO within HUGO

It is not possible to use Go packages within Hugo.

Unless you fork Hugo and add the package on your own.

---

<div class="post-metadata">

**Author:** ![tomkonidas](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tomkonidas/32/13652_2.png) [@tomkonidas](https://discourse.gohugo.io/u/tomkonidas)\
**Post date:** [February 19, 2021, 4:53pm UTC](https://discourse.gohugo.io/t/how-to-use-go-inside-hugo/31314/3 "2021-02-19T16:53:43Z")

</div>

Oh that is bummer ☹

I do not want to fork Hugo.

Thanks for the quick reply anyways
