Using *string in a struct is useful when: You need optional fields (distinguishing nil vs. empty string ""). You need to differentiate between zero value (empty string) and unset value. You want to save memory when fields are rarely used. Downsides: Adds complexity (requires nil checks, dereferencing). Increases garbage collection pressure. Reduces code readability for simple cases. Best Practices: Use *string for optional/nullable fields. Use string if the field is required or has a meaningful default.
again commenting same .. BASIC VIDEOO .. we dont need another GO tutorial playlist .. please teach some good / advance concepts or algorithm or famous backend architectures using GO .. which is kinda unique and has a niche aud ...
Noted bro✅, Thank you for your feedback! 😊 I’m starting with basics to build a strong foundation but will dive into advanced concepts and backend architectures soon. But good news - The kind of video you want - "I am already recording that kind of video" and will be published soon
Thank you for this video
waited whole day for the video :)
💗
good explanation
thanks for struct method
i have seen many places
type Data struct {
Name *string
}
is this good way to write *string ?
Using *string in a struct is useful when:
You need optional fields (distinguishing nil vs. empty string "").
You need to differentiate between zero value (empty string) and unset value.
You want to save memory when fields are rarely used.
Downsides:
Adds complexity (requires nil checks, dereferencing).
Increases garbage collection pressure.
Reduces code readability for simple cases.
Best Practices:
Use *string for optional/nullable fields.
Use string if the field is required or has a meaningful default.
Homework for this video ??
again commenting same .. BASIC VIDEOO ..
we dont need another GO tutorial playlist .. please teach some good / advance concepts or algorithm or famous backend architectures using GO .. which is kinda unique and has a niche aud ...
Noted bro✅, Thank you for your feedback! 😊 I’m starting with basics to build a strong foundation but will dive into advanced concepts and backend architectures soon.
But good news - The kind of video you want - "I am already recording that kind of video" and will be published soon