From 375464b433be70b2b03a485be18df663c48ca508 Mon Sep 17 00:00:00 2001 From: Teiva Harsanyi <934784+teivah@users.noreply.github.com> Date: Tue, 12 Sep 2023 00:51:58 +0200 Subject: [PATCH] Merging desc --- docs/9-generics.md => 9-generics.md | 0 docs/chapter-1.md => chapter-1.md | 0 docs/mistakes.md | 4 + site/404.html | 46 +- site/9-generics/index.html | 764 ------------------------- site/chapter-1/index.html | 808 --------------------------- site/chinese/presentation/index.html | 46 +- site/index.html | 48 +- site/jobs/index.html | 48 +- site/mistakes/index.html | 50 +- site/search/search_index.json | 2 +- site/sitemap.xml.gz | Bin 127 -> 127 bytes 12 files changed, 31 insertions(+), 1785 deletions(-) rename docs/9-generics.md => 9-generics.md (100%) rename docs/chapter-1.md => chapter-1.md (100%) delete mode 100644 site/9-generics/index.html delete mode 100644 site/chapter-1/index.html diff --git a/docs/9-generics.md b/9-generics.md similarity index 100% rename from docs/9-generics.md rename to 9-generics.md diff --git a/docs/chapter-1.md b/chapter-1.md similarity index 100% rename from docs/chapter-1.md rename to chapter-1.md diff --git a/docs/mistakes.md b/docs/mistakes.md index fa3f2bc..282e9a6 100644 --- a/docs/mistakes.md +++ b/docs/mistakes.md @@ -6,6 +6,8 @@ This section contains a summary of the 100 mistakes in the book. Meanwhile, it's + + ![](inside-cover.png) ## Code and Project Organization @@ -142,6 +144,8 @@ The `any` type can be helpful if there is a genuine need for accepting or return **TL;DR**: Relying on generics and type parameters can prevent writing boilerplate code to factor out elements or behaviors. However, do not use type parameters prematurely, but only when you see a concrete need for them. Otherwise, they introduce unnecessary abstractions and complexity. + + [Source code](https://github.com/teivah/100-go-mistakes/tree/master/src/02-code-project-organization/9-generics/main.go) ### Not being aware of the possible problems with type embedding (#10) diff --git a/site/404.html b/site/404.html index d923815..37a9737 100644 --- a/site/404.html +++ b/site/404.html @@ -281,44 +281,6 @@ -
  • - - - - - Being confused about when to use generics (#9) - - - - -
  • - - - - - - - - -
  • - - - - - Go: Simple to learn but hard to master - - - - -
  • - - - - - - - -
  • @@ -366,9 +328,9 @@ - + -