Skip to content

Commit c73107a

Browse files
committed
docs: Update package and main example for clarity
- Improved Go code snippet to show correct folder structure - Fixed import paths and added go.mod example - Organized the code for better understanding
1 parent e3d561f commit c73107a

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

basic-questions.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -347,31 +347,51 @@ First-Class Citizen বলতে বোঝায় যা প্রোগ্র
347347
#### উদাহরণ
348348

349349
```go
350-
// package.go
350+
351+
## Folder Structure:
352+
353+
sk/
354+
├── go.mod
355+
├── main.go
356+
└── mypackage/
357+
└── package.go
358+
359+
360+
361+
// go.mod
362+
module sk
363+
364+
go 1.24.2
365+
366+
367+
// mypackage/package.go
351368
package mypackage
369+
352370
import "fmt"
353371

354372
func init() {
355-
fmt.Println("Init from mypackage")
373+
fmt.Println("Init from mypackage")
356374
}
357375

358376
// main.go
359377
package main
378+
360379
import (
361-
"fmt"
362-
"mypackage"
380+
"fmt"
381+
"sk/mypackage"
363382
)
364383

365384
func main() {
366-
fmt.Println("Main function")
385+
fmt.Println("Main function")
367386
}
368387
```
369388

370-
**আউটপুট:**
371-
372389
```
390+
✅ Expected Output:
391+
373392
Init from mypackage
374393
Main function
394+
375395
```
376396

377397
---

0 commit comments

Comments
 (0)