Pack operator in Go

Home Forums Go Programming Pack operator in Go

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #5463 Reply
    Humble
    Keymaster

    is called Pack operator in go programming. What does it mean? Simply as the name suggest it packs ( not really true though). Depends on where it has put (before or after a go type) it can act as a “pack” or “unpack” operation.

    To make it clear:

    If you have a slice called “s”, and if you see a function arg s..., the slice s elements will be unpacked and sent. At the same time, if you put s ...int, all the int values will be packed into the slice called s

Viewing 1 post (of 1 total)
Reply To: Pack operator in Go
Your information: