From e975c7d01660ba07ab59d031fc2f2da3d41bd339 Mon Sep 17 00:00:00 2001 From: CodeWAdi <110481392+CodeWAdi@users.noreply.github.com> Date: Wed, 12 Oct 2022 18:06:45 +0530 Subject: [PATCH] Add content to go nodes (#2273) * Updated content in various nodes in NodeJS -Why nodejs, Installing NodeJS , CommonJS vs ESM , Global keyword,npm workspaces , creating packages , __dirname , __filename Updated various sub groups with information in NODEJS * Update content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md * Update content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md * Update content/roadmaps/107-nodejs/content/100-nodejs-introduction/104-running-nodejs-code.md * Update content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md * Update content/roadmaps/107-nodejs/content/101-nodejs-modules/100-commonjs-vs-esm.md * Update content/roadmaps/107-nodejs/content/101-nodejs-modules/102-global-keyword.md * Update content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md * Update content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md * Update 101-why-nodejs.md * Update content/roadmaps/107-nodejs/content/102-nodejs-npm/105-npm-workspaces.md * Update content/roadmaps/107-nodejs/content/102-nodejs-npm/106-creating-packages.md * Update content/roadmaps/107-nodejs/content/105-nodejs-working-with-files/107-dirname.md * Update content/roadmaps/107-nodejs/content/105-nodejs-working-with-files/108-filename.md * Updated content in various nodes of GOLANG Updated content in the nodes go modules interfaces context goroutines channels buffer select Co-authored-by: Kamran Ahmed --- .../content/100-nodejs-introduction/101-why-nodejs.md | 2 +- .../content/101-nodejs-modules/102-global-keyword.md | 6 +++--- .../content/101-go-advanced/100-go-modules.md | 5 +++-- .../content/101-go-advanced/103-interfaces.md | 3 ++- .../109-golang/content/101-go-advanced/104-context.md | 5 ++++- .../content/101-go-advanced/105-goroutines.md | 4 +++- .../109-golang/content/101-go-advanced/106-channels.md | 9 ++++++--- .../109-golang/content/101-go-advanced/107-buffer.md | 9 ++++++++- .../109-golang/content/101-go-advanced/108-select.md | 10 +++++++--- 9 files changed, 37 insertions(+), 16 deletions(-) diff --git a/content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md b/content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md index b2605c2a4..a9f72123e 100644 --- a/content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md +++ b/content/roadmaps/107-nodejs/content/100-nodejs-introduction/101-why-nodejs.md @@ -6,4 +6,4 @@ Node.js is a cross-platform runtime, perfect for a wide range of use cases. Its Pros of Node.js Learn Node.js Why Choose Node.js? -5 Reasons to Choose Node.js \ No newline at end of file +5 Reasons to Choose Node.js diff --git a/content/roadmaps/107-nodejs/content/101-nodejs-modules/102-global-keyword.md b/content/roadmaps/107-nodejs/content/101-nodejs-modules/102-global-keyword.md index b5ca7f538..9d6fa3b50 100644 --- a/content/roadmaps/107-nodejs/content/101-nodejs-modules/102-global-keyword.md +++ b/content/roadmaps/107-nodejs/content/101-nodejs-modules/102-global-keyword.md @@ -1,8 +1,8 @@ # global keyword -The global object gives access to some useful functions that can be used directly in our code. The global object, in contrast to the global object in a browser, is not the Window object. It is just an object called 'Global'. +In browsers, the top-level scope is the global scope. This means that within the browser var something will define a new global variable. In Node.js this is different. The top-level scope is not the global scope; `var something` inside a Node.js module will be local to that module. Free Content -Official Documentation +global Keyword in Node.js What is Global Object? -Global Object in Node +Global Object in Node \ No newline at end of file diff --git a/content/roadmaps/109-golang/content/101-go-advanced/100-go-modules.md b/content/roadmaps/109-golang/content/101-go-advanced/100-go-modules.md index b8cd59c7c..5c90fd227 100644 --- a/content/roadmaps/109-golang/content/101-go-advanced/100-go-modules.md +++ b/content/roadmaps/109-golang/content/101-go-advanced/100-go-modules.md @@ -5,9 +5,10 @@ Go modules are a group of related packages that are versioned and distributed to Modules are identified by a module path that is declared in the first line of the go.mod file in our project. Free Content +Go Modules +Go Modules DigitalOcean: How to use Go Modules -Using Go Modules Go Modules Explained in 5 Minutes (by Golang Dojo on YouTube) How to create a module in Go How to use modules in Go -How to modify existing projects to use Go modules +How to modify existing projects to use Go modules \ No newline at end of file diff --git a/content/roadmaps/109-golang/content/101-go-advanced/103-interfaces.md b/content/roadmaps/109-golang/content/101-go-advanced/103-interfaces.md index c798778b6..58219d972 100644 --- a/content/roadmaps/109-golang/content/101-go-advanced/103-interfaces.md +++ b/content/roadmaps/109-golang/content/101-go-advanced/103-interfaces.md @@ -7,4 +7,5 @@ An interface in Go, is a type that defines a set of methods. If we have a type ( Go Interfaces Go by Example: Interfaces Golang Tutorial #22 - Interfaces (by Tech With Tim on YouTube) -Learn Go Interfaces \ No newline at end of file +Learn Go Interfaces +Understanding Go Interfaces diff --git a/content/roadmaps/109-golang/content/101-go-advanced/104-context.md b/content/roadmaps/109-golang/content/101-go-advanced/104-context.md index 223b2c9e8..0b6cba97e 100644 --- a/content/roadmaps/109-golang/content/101-go-advanced/104-context.md +++ b/content/roadmaps/109-golang/content/101-go-advanced/104-context.md @@ -3,6 +3,9 @@ The `context` package provides a standard way to solve the problem of managing state during a request. The package satisfies the need for request scoped data and provides a standardized way to handle: Deadlines, Cancellation Signals, etc. Free Content +Go Context +Go by Example: Context +Context in Go Understanding Contexts in Go DigitalOcean: How to Use Contests in Go -Go by Example: Context \ No newline at end of file +Go by Example: Context diff --git a/content/roadmaps/109-golang/content/101-go-advanced/105-goroutines.md b/content/roadmaps/109-golang/content/101-go-advanced/105-goroutines.md index 286eb1cfa..4c5b63bc4 100644 --- a/content/roadmaps/109-golang/content/101-go-advanced/105-goroutines.md +++ b/content/roadmaps/109-golang/content/101-go-advanced/105-goroutines.md @@ -6,6 +6,8 @@ In Go, each of these concurrent tasks are called `Goroutines`. Free Content Goroutines -GeeksForGeeks: Goroutines – Concurrency in Golang +Goroutines in Golang +GoRoutines +Understanding Concurrency Go by Example: Goroutines Golang Goroutine Basics You MUST Learn! (by Golang Dojo on YouTube) \ No newline at end of file diff --git a/content/roadmaps/109-golang/content/101-go-advanced/106-channels.md b/content/roadmaps/109-golang/content/101-go-advanced/106-channels.md index 3423c322e..d61acd6e2 100644 --- a/content/roadmaps/109-golang/content/101-go-advanced/106-channels.md +++ b/content/roadmaps/109-golang/content/101-go-advanced/106-channels.md @@ -1,10 +1,13 @@ # Channels -Channels are a programming construct. The idea of channels in Go is to use them with your Goroutines as a pipeline in order to communicate between multiple Goroutines using the channel operator which looks like an arrow: `<-`. +Channels are the pipes that connect concurrent goroutines. You can send values into channels from one goroutine and receive those values into another goroutine. +Channels are a typed conduit through which you can send and receive values with the channel operator, `<-` . Free Content Channels -GeeksForGeeks: Channel in Golang Go by Example: Channels -Golang Channel Basics You MUST Know! (by Golang Dojo on YouTube) \ No newline at end of file +Channels in Golang +Channels +GeeksForGeeks: Channel in Golang +Golang Channel Basics You must Know! diff --git a/content/roadmaps/109-golang/content/101-go-advanced/107-buffer.md b/content/roadmaps/109-golang/content/101-go-advanced/107-buffer.md index 58f40c940..3739703a3 100644 --- a/content/roadmaps/109-golang/content/101-go-advanced/107-buffer.md +++ b/content/roadmaps/109-golang/content/101-go-advanced/107-buffer.md @@ -1 +1,8 @@ -# Buffer \ No newline at end of file +# Buffer + + The `buffer` belongs to the byte package of the Go language, and we can use these package to manipulate the byte of the string. + + Free Content +Buffer Examples +Buffer +Buffers in Golang \ No newline at end of file diff --git a/content/roadmaps/109-golang/content/101-go-advanced/108-select.md b/content/roadmaps/109-golang/content/101-go-advanced/108-select.md index 45ea83320..966bcdbd6 100644 --- a/content/roadmaps/109-golang/content/101-go-advanced/108-select.md +++ b/content/roadmaps/109-golang/content/101-go-advanced/108-select.md @@ -1,7 +1,11 @@ # Select -The `select` statement is similar to a `case` statement, but is primarily used for handling reading from multiple channels. +The `select` statement lets a goroutine wait on multiple communication operations. + +A `select` blocks until one of its cases can run, then it executes that case. It chooses one at random if multiple are ready. The `select` statement is just like switch statement, but in the select statement, case statement refers to communication, i.e. sent or receive operation on the channel. Free Content -Go by Example: Select -Select Statement in Go +Select +Go by Example: Select +Select in Golang +Select Statement