Skip to main content
ProductsDesktop toolsTASTECADDrawing reviewTASTEFILESFile managementTASTEFTPFile transferTASTESSHRemote workspaceTASTEZIPCompression and extractionTASTEWINMFile managementDeveloper toolsTASTECODERust integrated development environmentTASTESTUDIOIntegrated development and test environmentTASTEETLData integration (ETL)ServersTASTEREMOTERemote desktop serverTASTEGEOGeospatial serverTASTEMAILMail workspaceInvestingTASTESTOCKStock auto-trading desktop appGet startedDownloadsDocumentationBuyAll products
Marketplace
News
TechNewsToday's dev newsDeveloper docsProgramming languagesRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp & desktop frameworksTauriFlutterReact NativeElectronAlgorithmsAlgorithm basicsCore algorithmsAdvanced algorithmsPractical algorithms
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcaseCommunity guide
Work with usTech transferWebsite buildDesktop app buildRelease and payment pipelineSales partnerContact
ServicesRemote desktopCustom installer packages
TASTEDEV
Products

Desktop tools

TASTECADComplex drawings, opened with easeTASTEFILESJust the files you need, as fast as possibleTASTEFTPThe tidiest path for your filesTASTESSHA stronger link between you and your serversTASTEZIPPack faster, unpack saferTASTEWINMA keyboard-first file manager with two panes

Developer tools

TASTECODEEdit, build, debug and test Rust apps in one windowTASTESTUDIOFrom editing to remote tests and approved AI fixesTASTEETLMove data while you watch the values

Servers

TASTEREMOTEA remote desktop you run on your own serverTASTEGEORebuilding a GeoServer-compatible geospatial server in RustTASTEMAILTake back control of your email

Investing

TASTESTOCKStock auto-trading that follows the rules you set: when, and what

Get started

DownloadsLatest builds of every productDocsHow to use each productBuySubscriptions and perpetual licencesAll productsEvery product at a glance
All products
MarketplaceNews
Tech

News

Today's dev newsOfficial announcements on languages, frameworks, GitHub and AIDeveloper docsGuides to languages, frameworks and algorithms

Programming languages

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App & desktop frameworksTauriFlutterReact NativeElectron

Algorithms

Algorithm basicsComplexity analysis · Sorting · Searching · Basic data structures · Trees and heapsCore algorithmsGraph traversal · Shortest paths & minimum spanning trees · Dynamic programming · Greedy algorithms · Divide and conquer · BacktrackingAdvanced algorithmsString algorithms · Math and number theory · Bit manipulation · Segment trees · Union-findPractical algorithmsCoding interview strategy · LRU cache · Rate limiting · Consistent hashing
All development docs
Community
ProjectsDiscover builders and their workDevelopment logsDecisions and lessons learnedPromptsReusable instructionsAI tool issuesProblems and workarounds for Claude, Codex, GeminiShowcaseFinished resultsCommunity guideHow we build in the open
Work with us
Tech transferNative apps in Rust and eguiWebsite build10 languages, accounts, docs and downloadsDesktop app buildRust and egui, no WebViewRelease and payment pipelineSigning, MSI, deb, rpm, AppImage, hashesSales partnerRecommend us and earn 30%ContactBuilds, partnerships and investment
Services
Remote desktopReach your computer from a browserCustom installer packagesOnly the features you need, settings preloaded
Buy
EN
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Log in
Log in
TASTEDEV

From small tools to better development.

support@tastedev.netSupport TASTEDEV
ProductsProduct lineupBuyDocsDownloadsMarketplaceSupport
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcase
PoliciesAbout usPrivacy policyTerms of serviceSubscription termsRefund policyCommunity guidelines
AccountLog inSign up
Visitors
Today
Yesterday
Total views
Company
GXSOFT
Representative
CHOI YOUNG GU
Business registration number
853-44-00368
Address
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Phone
+82-10-4404-1523
Email
whitecalvin@tastedev.net
Privacy officer
CHOI YOUNG GU

© 2026 TASTEDEVProduct information is based on verified development sources.Released · improving

Go docs
Go
Getting Started with GoSyntax BasicsTypes and DataModules and PackagesErrors and TestingKey Concepts: Concurrency
Discussions

Go guide · 1/6

Getting Started with Go

Go was designed to be boring in the best sense: a small language, a fast compiler, and concurrency built in from day one. This chapter walks you from a fresh machine to a compiled binary. You will install the toolchain, create a module, run and build a program, and wire up your editor so it catches mistakes as you type.

Installing the toolchain

Grab an installer for your platform from go.dev/dl. On Windows and macOS, run the installer and you are done. On Linux, the usual approach is to unpack the archive into /usr/local and add /usr/local/go/bin to your PATH. Package managers such as Homebrew or winget work too, though Linux distribution repositories sometimes lag well behind the current release, so check what you actually got.

# Linux: replace any previous install and put go on the PATH
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go*.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

# Confirm everything is wired up
go version
go env GOPATH GOROOT

If go version prints a version string, the install worked. go env shows the settings the toolchain uses. GOROOT is where Go itself lives. GOPATH holds the module download cache and, under GOPATH/bin, any binaries you install with go install. Adding that bin directory to your PATH saves a lot of typing later.

Your first module

Go organizes code into modules: a directory containing a go.mod file, plus every package beneath it. Start each new project with go mod init and a module path. By convention, the path is where the code will eventually live, such as a repository URL, but any unique name works while you experiment.

mkdir hello && cd hello
go mod init example.com/hello

Now add main.go. Anything you want to compile into an executable must be in package main and must define a main function, which is where execution begins.

package main

import "fmt"

func main() {
	fmt.Println("Hello, Go!")
}

Running and building

go run compiles and runs in one step, dropping the binary in a temporary directory. It is ideal for quick iterations. go build leaves a real executable behind in the current directory.

go run .             # compile the current package and run it
go build             # produces ./hello (hello.exe on Windows)
go build -o bin/app  # choose the output path
./hello

# Cross-compile for another platform: just set two variables
GOOS=linux GOARCH=arm64 go build -o hello-linux-arm64

By default a Go binary is a single self-contained file, which makes deployment refreshingly simple: copy it to the server and run it. Cross-compiling needs no extra toolchain; GOOS and GOARCH are all it takes.

The go command at a glance

CommandWhat it does
go run .Compile and run immediately
go buildBuild an executable or check that a package compiles
go test ./...Run tests in every package
go fmt ./...Rewrite code into the standard format
go vet ./...Static checks for common bugs
go mod tidySync go.mod with what the code imports
go doc fmt.PrintlnRead documentation in the terminal

The ./... pattern means "this directory and everything below it." Because gofmt defines the one true layout, Go teams simply do not argue about brace placement or indentation. Go source uses tabs for indentation, and the formatter takes care of the rest.

Laying out a project

A tiny program needs nothing more than go.mod and main.go. As a codebase grows, a layout like the one below is common. None of it is mandatory, with one exception: the toolchain gives the internal directory special meaning.

hello/
  go.mod            # module path and dependency requirements
  go.sum            # checksums for those dependencies
  main.go           # package main
  cmd/
    server/main.go  # one directory per extra binary
  internal/
    store/store.go  # importable only from inside this module
  greet/
    greet.go        # a package other modules may import

Every directory is exactly one package, and all .go files in it must declare the same package name. Packages under internal can only be imported by code rooted at the parent of that internal directory, which makes it the natural home for implementation details you do not want to support publicly.

Editor setup with gopls

gopls (pronounced "go please") is the official language server maintained by the Go team. It powers completion, go-to-definition, rename, diagnostics, and automatic import management. In VS Code, install the Go extension and accept its prompt to install the tools. GoLand ships its own analysis engine. Neovim, Emacs, Helix, and other LSP-capable editors can all talk to gopls directly.

go install golang.org/x/tools/gopls@latest
gopls version

Configure your editor to run gofmt or goimports on save. This matters more in Go than elsewhere: unused imports and unused local variables are compile errors, not warnings, so having imports added and removed automatically keeps you in flow.

Summary

  • Install from go.dev/dl and verify with go version.
  • Start a project with go mod init <module path>; executables live in package main and start at main.
  • Use go run for quick feedback, go build for binaries, and GOOS/GOARCH for cross-compiling.
  • One directory equals one package, and internal keeps code private to your module.
  • Hook gopls into your editor and format on save.
Questions about this chapter?
Next chapterSyntax Basics

0 comments

Top commentsNewest first

Sign in · Sign in to leave a comment.