Episode 3: Structs & Methods in Golang

Поделиться
HTML-код
  • Опубликовано: 16 янв 2025

Комментарии • 9

  • @a4arpon
    @a4arpon Месяц назад +1

    Thank you for this video

  • @underroot8340
    @underroot8340 Месяц назад +3

    waited whole day for the video :)

  • @Cufylicy_shorts
    @Cufylicy_shorts Месяц назад

    good explanation

  • @livecanlife2831
    @livecanlife2831 Месяц назад

    thanks for struct method
    i have seen many places
    type Data struct {
    Name *string
    }
    is this good way to write *string ?

    • @sandeepdev0
      @sandeepdev0  Месяц назад

      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.

  • @anmolanand9941
    @anmolanand9941 Месяц назад

    Homework for this video ??

  • @zeta_meow_meow
    @zeta_meow_meow Месяц назад

    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 ...

    • @sandeepdev0
      @sandeepdev0  Месяц назад

      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