Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2bd0776

Browse files
adding 2 new questions
1 parent ef1aec0 commit 2bd0776

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

‎README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@
12561256
| 20 | [How would you tell a goroutine to use less core than what you have?](#how-would-you-tell-a-goroutine-to-use-less-core-than-what-you-have)
12571257
| 21 | [How would you determine the type of a variable and Which package to use for it?](#how-would-you-determine-the-type-of-a-variable-and-which-package-to-use-for-it)
12581258
| 22 | [What all types can map store?](#what-all-types-can-map-store)
1259-
| 23 | [What are services in golang?](#what-are-services-in-golang)
1259+
| 23 | [What are microservices?](#what-are-microservices)
12601260
| 24 | [Why are there no classes in Go?](#why-are-there-no-classes-in-go)
12611261
| 25 | [Difference between Compile time and runtime?](#difference-between-compile-time-and-runtime)
12621262
| 26 | [Do you need to convert the type of a variable of interface{} type passed in a function as an argument?](#do-you-need-to-convert-the-type-of-a-variable-of-interface{}-type-passed-in-a-function-as-an-argument)
@@ -1613,6 +1613,42 @@
16131613
16141614
16151615
1616+
22. ### What all types can map store?
1617+
**Value** - The Value type of a mpa can be anything, including another map <br/>
1618+
**Key** - The key type of Map can only be values that can be compared i.e - boolean, numeric, string, pointer, channel, and interface types, and structs or arrays , that excludes - slices, maps, and functions
1619+
1620+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1621+
1622+
23. ### What are microservices?
1623+
Microservices is an architectural style that structures an application as a collection of services that are
1624+
* Highly maintainable and testable
1625+
* Loosely coupled
1626+
* Independently deployable
1627+
* Organized around business capabilities
1628+
* Owned by a small team
1629+
1630+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1631+
1632+
24. ### Why are there no classes in Go ?
1633+
1634+
Go doesn't require an explicit class definition as Java, C++, C#, etc do. Instead, a "class" is implicitly defined by providing a set of "methods" which operate on a common type. The type may be a struct or any other user-defined type. For example:
1635+
1636+
```go
1637+
type Integer int;
1638+
func (i *Integer) String() string {
1639+
return strconv.itoa(i)
1640+
}
1641+
```
1642+
is analogous to below code in java:<br/>
1643+
1644+
```java
1645+
class Integer {
1646+
public int i;
1647+
public String toString() { return Integer.toString(i); }
1648+
}
1649+
```
1650+
**[ Back to Top ⬆ ](#table-of-contents---golang)**
1651+
16161652

16171653

16181654
### Table of Contents - Database Engineering

‎test.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
| 23 | [What are services in golang?](#what-are-services-in-golang)
3+
| 24 | [Why are there no classes in Go?](#why-are-there-no-classes-in-go)
4+
| 25 | [Difference between Compile time and runtime?](#difference-between-compile-time-and-runtime)
5+
| 26 | [Do you need to convert the type of a variable of interface{} type passed in a function as an argument?](#do-you-need-to-convert-the-type-of-a-variable-of-interface{}-type-passed-in-a-function-as-an-argument)
6+
| 27 | [Why are goroutines light-weight?](#why-are-goroutines-light-weight)
7+
| 28 | [If capacity is not defined in slice, what would the capacity be?](#if-capacity-is-not-defined-in-slice,-what-would-the-capacity-be)
8+
| 29 | [What is the easiest way to check if a slice is empty?](#what-is-the-easiest-way-to-check-if-a-slice-is-empty)
9+
| 30 | [What is an advantage of Go evaluating implicit types at compile time?](#what-is-an-advantage-of-go-evaluating-implicit-types-at-compile-time)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /