baggiiiie

~

/

zettelkasten

/

go struct

go-struct

Aug 22, 2025

  • go
  • programming

content

  • a struct is just structured data
  • human level: grouping fields together
  • machine level: grouping memory together

(a struct is) a named set of values that occupy a block of memory. … A struct occupies a contiguous block of memory, → struct (C programming language)

adding paddings to a struct, The Go Programming Language:

struct {
	x, y int
	_ float32  // padding
	A *[]int
	F func()
}

up

down

  • struct-alignment
  • go-struct-method
  • empty-struct

reference


Graph View

  • content
  • up
  • down
  • reference

Backlinks

  • empty-struct
  • go-anonymous-struct
  • go-embedded-struct
  • go-named-type
  • go-struct-method
  • go-type
  • struct-alignment

baggiiiie's learning notes on tech stuff