// NewItem creates a new menu item with name and description. func NewItem(name, desc string) (*MenuItem, error) { cname := C.CString(name) cdesc := C.CString(desc) var item *C.ITEM var err error item, err = C.new_item(cname, cdesc) return &MenuItem{item}, ncursesError(err) }
func NewItem(name string, desc string) *Item { return (*Item)(C.new_item(C.CString(name), C.CString(desc))) }
func NewItem(name string, desc string) *Item { //Memory Leaks: do something about it sometime return &Item{C.new_item(C.CString(name), C.CString(desc))} }