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 <kamranahmed.se@gmail.com>pull/2259/head^2
parent
408ab9752f
commit
e975c7d016
9 changed files with 37 additions and 16 deletions
@ -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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='blue' badgeText='Read' href='https://nodejs.org/api/globals.html'>Official Documentation</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://nodejs.org/api/globals.html#global'>global Keyword in Node.js</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=jn8PZNBmKm0'>What is Global Object?</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=PY-AycMkEAg'>Global Object in Node</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=PY-AycMkEAg'>Global Object in Node</BadgeLink> |
@ -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, `<-` . |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='blue' badgeText='Official Website' href='https://go.dev/tour/concurrency/2'>Channels</BadgeLink> |
||||
<BadgeLink badgeText='Read' href='https://www.geeksforgeeks.org/channel-in-golang/'>GeeksForGeeks: Channel in Golang</BadgeLink> |
||||
<BadgeLink badgeText='Read' href='https://gobyexample.com/channels'>Go by Example: Channels</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://youtu.be/LgCmPHqAuf4'>Golang Channel Basics You MUST Know! (by Golang Dojo on YouTube)</BadgeLink> |
||||
<BadgeLink badgeText='Read' herf='https://golangbot.com/channels/'>Channels in Golang</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=e4bu9g-bYtg'>Channels</BadgeLink> |
||||
<BadgeLink badgeText='Read' href='https://www.geeksforgeeks.org/channel-in-golang/'>GeeksForGeeks: Channel in Golang</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://youtu.be/LgCmPHqAuf4'>Golang Channel Basics You must Know!</BadgeLink> |
||||
|
@ -1 +1,8 @@ |
||||
# Buffer |
||||
# 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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='blue' badgeText='Official Website' href='https://pkg.go.dev/bytes#example-Buffer'>Buffer Examples</BadgeLink> |
||||
<BadgeLink badgeText='Read' herf='https://www.educba.com/golang-buffer/'>Buffer</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=NoDRq6Twkts'>Buffers in Golang</BadgeLink> |
@ -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. |
||||
|
||||
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://gobyexample.com/select'>Go by Example: Select</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://golangdocs.com/select-statement-in-golang'>Select Statement in Go</BadgeLink> |
||||
<BadgeLink colorScheme='blue' badgeText='Official Website' href='https://go.dev/tour/concurrency/5'>Select</BadgeLink> |
||||
<BadgeLink badgeText='Read' href='https://gobyexample.com/select'>Go by Example: Select</BadgeLink> |
||||
<BadgeLink badgeText='Read' herf='https://www.geeksforgeeks.org/select-statement-in-go-language/'>Select in Golang</BadgeLink> |
||||
<BadgeLink badgeText='Watch' href='https://www.youtube.com/watch?v=1c7ttSJDMAI'>Select Statement</BadgeLink> |
||||
|
Loading…
Reference in new issue