Anyone can write templates, which are packaged and distributed as modules, leveraging the Go module proxy and checksum database for better security and availability.Anyone can write templates, which are packaged and distributed as modules, leveraging the Go module proxy and checksum database for better security and availability.

Go Project Templates: How to Get Started

2025/09/21 00:00
Okuma süresi: 3 dk

When you start a new project in Go, you might begin by cloning an existing project. That way, you can start with something that already works, making incremental changes instead of starting from scratch.

\ For a long time now, we have heard from Go developers that getting started is often the hardest part. New developers coming from other languages expect guidance on a default project layout, experienced developers working on teams expect consistency in their projects’ dependencies, and developers of all kinds expect an easy way to try new products and services without having to copy and paste from samples on the web.

\ To that end, today we published gonew, an experimental tool for instantiating new projects in Go from predefined templates. Anyone can write templates, which are packaged and distributed as modules, leveraging the Go module proxy and checksum database for better security and availability.

\ The prototype gonew is intentionally minimal: what we have released today is an extremely limited prototype meant to provide a base from which we can gather feedback and community direction. Try it out, tell us what you think, and help us build a more useful tool for everyone.

Getting started

Start by installing gonew using go install:

$ go install golang.org/x/tools/cmd/gonew@latest 

\ To copy an existing template, run gonew in your new project’s parent directory with two arguments: first, the path to the template you wish to copy, and second, the module name of the project you are creating. For example:

$ gonew golang.org/x/example/helloserver example.com/myserver $ cd ./myserver 

\ And then you can read and edit the files in ./myserver to customize.

\ We’ve written two templates to get you started:

  • hello: A command line tool that prints a greeting, with customization flags.
  • helloserver: An HTTP server that serves greetings.

Write your own templates

Writing your own template is as easy as creating any other module in Go. Check out the examples we linked above to get started.

\ There are also examples available from the Google Cloud and Service Weaver teams.

Next steps

Please try out gonew and let us know how we can make it better and more useful. Remember, gonew is just an experiment for now; we need your feedback to get it right.


Cameron Balahan

\ This article is available on The Go Blog under a CC BY 4.0 DEED license.

\ Photo by Clemens van Lay on Unsplash

Piyasa Fırsatı
ANyONe Protocol Logosu
ANyONe Protocol Fiyatı(ANYONE)
$0.1501
$0.1501$0.1501
-6.01%
USD
ANyONe Protocol (ANYONE) Canlı Fiyat Grafiği
Sorumluluk Reddi: Bu sitede yeniden yayınlanan makaleler, halka açık platformlardan alınmıştır ve yalnızca bilgilendirme amaçlıdır. MEXC'nin görüşlerini yansıtmayabilir. Tüm hakları telif sahiplerine aittir. Herhangi bir içeriğin üçüncü taraf haklarını ihlal ettiğini düşünüyorsanız, kaldırılması için lütfen service@support.mexc.com ile iletişime geçin. MEXC, içeriğin doğruluğu, eksiksizliği veya güncelliği konusunda hiçbir garanti vermez ve sağlanan bilgilere dayalı olarak alınan herhangi bir eylemden sorumlu değildir. İçerik, finansal, yasal veya diğer profesyonel tavsiye niteliğinde değildir ve MEXC tarafından bir tavsiye veya onay olarak değerlendirilmemelidir.

Ayrıca Şunları da Beğenebilirsiniz

ETH Exit Queue Gridlocks As Validators Pile Up

ETH Exit Queue Gridlocks As Validators Pile Up

The post ETH Exit Queue Gridlocks As Validators Pile Up appeared on BitcoinEthereumNews.com. Welcome to The Protocol, CoinDesk’s weekly wrap of the most important stories in cryptocurrency tech development. I’m Margaux Nijkerk, a reporter at CoinDesk. In this issue: Ethereum Faces Validator Bottleneck With 2.5M ETH Awaiting Exit Is Ethereum’s DeFi Future on L2s? Liquidity, Innovation Say Perhaps Yes Ethereum Foundation Starts New AI Team to Support Agentic Payments American Express Introduces Blockchain-Based ‘Travel Stamps’ Network News ETHEREUM VALIDATOR EXIT QUEUE FACES BOTTLENECK: Ethereum’s proof-of-stake system is facing its largest test yet. As of mid-September, roughly 2.5 million ETH — valued at roughly $11.25 billion — is waiting to leave the validator set, according to validator queue dashboards. The backlog pushed exit wait times to more than 46 days on Sept. 14, the longest in Ethereum’s short staking history, dashboards show. The last peak, in August, put the exit queue at 18 days. The initial spark came on Sept. 9, when Kiln, a large infrastructure provider, chose to exit all of its validators as a safety precaution. The move, triggered by recent security incidents including the NPM supply-chain attack and the SwissBorg breach, pushed around 1.6 million ETH into the queue at once. Though unrelated to Ethereum’s staking protocol itself, the hacks rattled confidence enough for Kiln to hit pause, highlighting how events in the broader crypto ecosystem can cascade into Ethereum’s validator dynamics. In a blog post from staking provider Figment, Senior Analyst Benjamin Thalman noted that the current exit queue build up isn’t only about security. After ETH has rallied more than 160% since April, some stakers are simply taking profits. Others, especially institutional players, are shifting their portfolios’ exposure. At the same time, the number of validators entering the Ethereum staking ecosystem has been steadily rising. Ethereum’s churn limit, which is a protocol safeguard that caps how many validators can…
Paylaş
BitcoinEthereumNews2025/09/18 15:15
TheWell Bioscience Launches VitroPrime™ 3D Culture and Imaging Plate for Organoid and 3D Cell Culture Workflows

TheWell Bioscience Launches VitroPrime™ 3D Culture and Imaging Plate for Organoid and 3D Cell Culture Workflows

A new in-plate, zero-disruption design enables reproducible organoid culture, downstream processing, and high-resolution imaging in a single 3D cell culture plate
Paylaş
AI Journal2026/02/09 22:02
Tom Lee Linked BitMine Scoops Up $82 Million in Ethereum as Institutional Appetite Heats Up

Tom Lee Linked BitMine Scoops Up $82 Million in Ethereum as Institutional Appetite Heats Up

Tom Lee–Backed BitMine Makes $82 Million Ethereum Purchase, Signaling Growing Institutional Confidence BitMine, a crypto-focused firm associated with veteran ma
Paylaş
Hokanews2026/02/09 22:08