Skip to content

Commit 5bd4957

Browse files
authored
Merge pull request #14 from hespecial/dev
fix formatting
2 parents 3baf011 + c6647c4 commit 5bd4957

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/en/guide/interview/golang/basic/1-basic.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ The advantage of using pointer transfer is that it directly transfers the addres
559559

560560
### Golang Common String Concatenation Methods and Their Efficiency
561561

562-
::: details
562+
::: details Answer
563563

564564
| Method | Description |
565565
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- |
@@ -582,11 +582,13 @@ The advantage of using pointer transfer is that it directly transfers the addres
582582

583583
### What Are Tags Used for in Golang?
584584

585-
::: details
585+
::: details Answer
586586

587587
In Go, struct fields can have various custom tags. When parsing a struct, these tags can be extracted for convenient operations. Common tags include:
588588

589589
- `json`: Used to declare JSON serialization and deserialization operations, specifying fields and options.
590590
- `db`: Primarily used for database field configuration, often in libraries like sqlx.
591591
- `form`: Commonly used in web frameworks to declare form field bindings.
592592
- `validate`: Frequently used for field validation rules by validators.
593+
594+
:::

src/guide/interview/golang/basic/1-basic.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ func main() {
617617

618618
### Golang 常见的字符串拼接方式有哪些?效率有何不同?
619619

620-
::: details
620+
::: details 答案
621621

622622
| 方法 | 描述 |
623623
| ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
@@ -640,7 +640,7 @@ func main() {
640640

641641
### Golang 中的 Tag 有什么用?
642642

643-
::: details
643+
::: details 答案
644644

645645
Golang 的结构体字段可以添加各类自定义的 `Tag`, 在解析结构体时可以使用函数将 `Tag` 解析出来,方便进行操作,常见的 `Tag`:
646646

0 commit comments

Comments
 (0)