Новый Голанг

// ## Go new keyword
// - Go has two allocation primitives, the built-in functions new and make.
// - They do different things and apply to different types, which can be confusing, but the rules are simple. 
// - In Go terminology, it returns a pointer to a newly allocated zero value of type T.
// - Since the memory returned by new is zeroed, it's helpful to arrange when designing your data structures that the zero value of each type can be used without further initialization. This means a user of the data structure can create one with new and get right to work. 
type SyncedBuffer struct {
    lock    sync.Mutex
    buffer  bytes.Buffer
}

p := new(SyncedBuffer)  // type *SyncedBuffer
gopher072