Getting Started
- Create a new directory
$ mkdir ~/notes$ cd ~/notes- Init the repository
$ nt initA new subdirectory .nt has been created in the current repository containing the default configuration files.
$ tree -a.├── .nt│ ├── .gitignore│ ├── config.jsonnet│ └── nt.libsonnet└── .ntignore- Create a new file
$ cat << EOF > go.md---tags: go---
# Go
## Common Mistakes
### Note: Using goroutines on loop iterator variables
`@source: https://go.dev/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables`
```go// ❌ DON'Tfor _, val := range values { go func() { fmt.Println(val) }()}
// ✅ DOfor _, val := range values { go func(val interface{}) { fmt.Println(val) }(val)}```
By adding `val` as a parameter to the closure, `val` is evaluated at each iteration and placed on the stack for the goroutine.
## Note: Golang Conferences `#watching`
* GopherCon, USA, Late August `#remind-every-${year}-08`* GopherCon Europe, Mid June
### Flashcard: Largest Conference
(Go) **Largest conference**?
---
**GopherCon** is the United States.EOFIn practice, you will use your favorite editor or IDE to edit your Markdown notes.
- Add the file
$ nt add .Things becomes more interesting. The command add parses all Markdown files to extract objects (like notes and flashcards) and add them to the index. The objects are also saved in a SQLite database for performance reasons and for full-text search support.
$ tree -a.├── .nt│ ├── .gitignore│ ├── config.jsonnet│ ├── database.db│ ├── index│ ├── nt.libsonnet│ └── objects│ └── 98│ ├── 984f0d5226f6cb15ebae9ec89579ae82a7b2f487.blob│ └── 984f0d5226f6cb15ebae9ec89579ae82a7b2f487.pack├── .ntignore└── go.md- Manipulate the objects
The CLI nt is mainly used when editing your notes. To use your notes creatively, you will use The NoteWriter Desktop. Follow the installation instructions and simply run inside your repository:
$ nt-desktopThis application is where your notes will come alive. You will be able to study your flashcards, complete your reminders, render notes like you would manipulate them on your desk, or even relax and review random notes to find inspiration.