Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

Setting Go variables from the outside

Blog post from Cloudflare

Post Details
Company
Date Published
Author
Filippo Valsorda
Word Count
456
Company Posts That Month
11
Language
English
Hacker News Points
146
Post removed?
No
Summary

Filippo Valsorda from CloudFlare discusses the use of the -X linker option in Go programming to embed version numbers into binaries. The -X option sets the value of a string variable in the linked Go program and can be used with the -ldflags option. An example is provided where the who variable's value is changed from "World" to "CloudFlare". This method works even when using external linking, such as cgo. The author also mentions that CloudFlare is hiring in London, San Francisco, and Singapore for those interested in working with experienced Go developers.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.