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: inventory_read_query.go
    path of file: ./repos/tania-core/backend/src/tasks/query/inmemory
    
    the code of the file until where you have to start completion: package inmemory

import (
	"github.com/gofrs/uuid"
	assetsdomain "github.com/usetania/tania-core/src/assets/domain"
	assetsstorage "github.com/usetania/tania-core/src/assets/storage"
	"github.com/usetania/tania-core/src/tasks/query"
)

type MaterialQueryInMemory struct {
	Storage *assetsstorage.MaterialReadStorage
}

func NewMaterialQueryInMemory(s *assetsstorage.MaterialReadStorage) query.Material {
	return MaterialQueryInMemory{Storage: s}
}

func (s MaterialQueryInMemory) FindMaterialByID(inventoryUID uuid.UUID) <-chan query.Result {
	result := make(chan query.Result)

	go func() {
		s.Storage.Lock.RLock()
		defer s.Storage.Lock.RUnlock()

		ci := query.TaskMaterialResult{}

		for _, val := range s.Storage.MaterialReadMap {
			// WARNING, domain leakage
			if val.UID == inventoryUI
    
func (s MaterialQueryInMemory) FindMaterialByID(inventoryUID uuid.UUID) <-chan query.Result {
	result := make(chan query.Result)

	go func() {
		s.Storage.Lock.RLock()
		defer s.Storage.Lock.RUnlock()

		ci := query.TaskMaterialResult{}

		for _, val := range s.Storage.MaterialReadMap {
			// WARNING, domain leakage
			if val.UID == inventoryUID {
				ci.UID = val.UID
				ci.Name = val.Name
				ci.TypeCode = val.Type.Code()

				switch v := val.Type.(type) {
				case assetsdomain.MaterialTypeSeed:
					ci.DetailedTypeCode = v.PlantType.Code
				case assetsdomain.MaterialTypePlant:
					ci.DetailedTypeCode = v.PlantType.Code
				case assetsdomain.MaterialTypeAgrochemical:
					ci.DetailedTypeCode = v.ChemicalType.Code
				}
			}
		}
		result <- query.Result{Result: ci}

		close(result)
	}()

	return result
}