Posts with the tag Golang

How to save cookies as a file in Golang

Go’s cookiejar doesn’t have any function to persistence cookies, so you need to do something to save cookies to a local file. To make it easy, you can use juju/persistent-cookiejar instead. ...

Generate URL cards when building your Hugo site on GitHub Actions

Hugo is known as a super-fast static site generator. It also has many functionaries such as shortcodes. However, it’s not good at dynamic processing because it can’t use remote files other than JSON or CSV. So we need an API server to generate link cards from URLs. Although, it’s wasteful to use a rental server and I also want to run it locally....