You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: imagelist.go
    path of file: ./repos/darktile/vendor/github.com/lxn/walk
    
    the code of the file until where you have to start completion: // Copyright 2010 The Walk Authors. All rights reserved.
// Use of this source code 
    
func (il *ImageList) AddMasked(bitmap *Bitmap) (int32, error) {
	if bitmap == nil {
		return 0, newError("bitmap cannot be nil")
	}

	if index, ok := il.colorMaskedBitmap2Index[bitmap]; ok {
		return int32(index), nil
	}

	index := win.ImageList_AddMasked(
		il.hIml,
		bitmap.handle(),
		win.COLORREF(il.maskColor))
	if index == -1 {
		return 0, newError("ImageList_AddMasked failed")
	}

	il.colorMaskedBitmap2Index[bitmap] = int(index)

	return index, nil
}