---
# System prepended metadata

title: Go Modules Essentials
tags: [engineering]

---

---
tags: engineering
---

# Go Modules Essentials

## Cheat Sheet

### Initialize a Project for Modules

```
$ go mod init ${module_name}
```

- creates `go.mod`
    - `module ${module_name}`
    - `go (minimum go version)` 

### Add (the latest) of a New Dependency (sub V2)

```
$ go get ${module_name}
```

### Add (the latest) of a New Dependency (including V2+)

```
$ go get ${module_name}
```

