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: module.go
    path of file: ./repos/trivy/pkg/iac/terraform
    
    the code of the file until where you have to start completion: package terraform

import (
	"fmt"
	"strings"
)

type Module struct {
	blocks     Blocks
	blockMap   map[string]Blocks
	rootPath   string
	modulePath string
	ignores    Ignores
	parent     *Module
}

func NewModule(rootPath, modulePath string, blocks Blocks, ignores Ignores) *Module {


    
func (c *Module) GetsModulesBySource(moduleSource string) (Blocks, error) {
	var results Blocks

	modules := c.getModuleBlocks()
	for _, module := range modules {
		if module.HasChild("source") && module.GetAttribute("source").Equals(moduleSource) {
			results = append(results, module)
		}
	}
	return results, nil
}