Go Tutorial #8 - Anonymous Functions & Closures

Поділитися
Вставка
  • Опубліковано 17 січ 2025

КОМЕНТАРІ • 15

  • @Nicholascarballo
    @Nicholascarballo Рік тому

    Amazing examples to help understand closures!

  • @TheMouseJerry-du1md
    @TheMouseJerry-du1md 8 місяців тому

    Really good video. Thank you so much!

    • @esoterictech
      @esoterictech  8 місяців тому

      No problem. Thanks for watching!

  • @shleebeez
    @shleebeez Рік тому

    would love to see advanced go videos and tips for work as a go dev

    • @esoterictech
      @esoterictech  Рік тому

      Any advanced topics in particular?

    • @shleebeez
      @shleebeez Рік тому

      possible ideas: go profiling tools. versioning best practices. distributed messaging using a technology like kafka. networking: load balancing and reverse proxy setups. any learnings from work too that helped you be a better engineer would be awesome, like more practical stuff@@esoterictech

  • @airkami
    @airkami 5 місяців тому

    Thanks for this I do want to look up slice in the docs for details because it seems like it either uses one sorting algo or it would know many of them

  • @da99436
    @da99436 2 роки тому

    Hey thanks man, I just started learning Go as my next programming language and the concept of anonymous functions and closures was alien to me. This helped a lot, subbed and looking forward to new tutorials!

  • @bradley5008
    @bradley5008 3 роки тому

    Can Go be used for front-end development?

  • @FLOWMASTERiT
    @FLOWMASTERiT 3 роки тому

    awesome content

  • @cybercozco3102
    @cybercozco3102 3 роки тому

    Hey, man do you think you could post a shareable link of your code to the Go playground in the descriptions? That way we can reference your code as we practice on our own.
    Another great vid btw

  • @nameless_9504
    @nameless_9504 3 роки тому

    I'm thinking this is simple 😂 closure func main(){add := func(x,y int)int{return x+y}fmt.Println(add(1,1))} | and btw the last question I asked I want to edit the slice play.golang.org/p/R1dtk_31cKy here is the link again like edit a specific value which we do it in python like s.setGrade(grade[0]) so it will change in only index 0 and value remains same as before help me with I'm so curious and waiting for answer for days!

    • @esoterictech
      @esoterictech  3 роки тому +2

      UPDATED - Cookie, If you want to change a specific value in the slice, your function should accept 2 parameters:
      1. The index that you want to be updated
      2. The NEW value that you want to set at that index
      You setGrade function should look like this:
      func (s *Student) setGrade(index int, newValue int) {
      s.Grade[index] = newValue
      }

    • @esoterictech
      @esoterictech  3 роки тому +1

      I just provided an answer on stackoverflow stackoverflow.com/questions/66839488/index-slice-within-main-func-when-using-setgrade/66877097#66877097

    • @nameless_9504
      @nameless_9504 3 роки тому

      @@esoterictech thanks! go is wired