Skip to content

Commit 3663f01

Browse files
committed
bug fix
1 parent 1984c4c commit 3663f01

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

README.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,32 +1462,33 @@
14621462

14631463
15. ### What are channels for?
14641464

1465-
Channels are the pipes that connect concurrent goroutines. You can send values into channels from one goroutine and receive those values into another goroutine.
1465+
Channels are the pipes that connect concurrent goroutines. You can send values into channels from one goroutine and receive those values into another goroutine.
14661466

1467-
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1467+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
14681468

14691469
16. ### Can you do something in goroutines using channels?
1470-
* Channels are goroutine-safe and can store and pass values between goroutines
1471-
* Channels provide FIFO semantics.
1472-
* Channels cause goroutines to block and unblock, which we just learned about.
1470+
* Channels are goroutine-safe and can store and pass values between goroutines
1471+
* Channels provide FIFO semantics.
1472+
* Channels cause goroutines to block and unblock, which we just learned about.
14731473

14741474
**[ Back to Top ⬆ ](#table-of-contents---golang)**
14751475

14761476
17. ### What is a Closure?
14771477

1478-
A closure is a function value that references variables from outside its body. The function may access and assign to the referenced variables
1478+
A closure is a function value that references variables from outside its body. The function may access and assign to the referenced variables.<br/>
14791479

14801480
**[ Back to Top ⬆ ](#table-of-contents---golang)**
14811481

14821482
18. ### What are runtime and runtime packages?
14831483

1484-
The runtime library implements garbage collection, concurrency, stack management, and other critical features of the Go language. The Package runtime contains operations that interact with Go's runtime system, such as functions to control goroutines.
1484+
The runtime library implements garbage collection, concurrency, stack management, and other critical features of the Go language. The Package runtime contains operations that interact with Go's runtime system, such as functions to control goroutines.
14851485
14861486
**[ Back to Top ⬆ ](#table-of-contents---golang)**
14871487
14881488
19. ### How can you get how many cores your computer has?
1489+
With the help of runtime package
14891490
1490-
```go
1491+
```go
14911492
package main
14921493
14931494
import (
@@ -1498,7 +1499,7 @@
14981499
func main() {
14991500
fmt.Println(runtime.NumCPU())
15001501
}
1501-
```
1502+
```
15021503
15031504
**[ Back to Top ⬆ ](#table-of-contents---golang)**
15041505
@@ -1625,9 +1626,9 @@
16251626
* Loosely coupled
16261627
* Independently deployable
16271628
* Organized around business capabilities
1628-
* Owned by a small team
1629+
* Owned by a small team <br/>
16291630
1630-
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1631+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
16311632
16321633
24. ### Why are there no classes in Go ?
16331634
@@ -1657,21 +1658,21 @@
16571658

16581659

16591660
26. ### How to generate a true random number in golang?
1660-
The default number generator is deterministic, so it’ll produce the same sequence of numbers each time by default , so you need to seed it with different number you can do it with nano seconds like below
1661+
The default number generator is deterministic, so it’ll produce the same sequence of numbers each time by default , so you need to seed it with different number you can do it with nano seconds like below <br/>
16611662

1662-
```go
1663-
package main
1664-
import (
1663+
```go
1664+
package main
1665+
import (
16651666
"fmt"
16661667
"math/rand"
16671668
"time"
16681669
)
1669-
func main(){
1670+
func main(){
16701671
s1 := rand.NewSource(time.Now().UnixNano())
16711672
r1 := rand.New(s1)
16721673
fmt.Print(r1.Intn(100))
1673-
}
1674-
```
1674+
}
1675+
```
16751676

16761677
**[ Back to Top ⬆ ](#table-of-contents---golang)**
16771678

0 commit comments

Comments
 (0)