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: gen_lexer_cmd.go
    path of file: ./repos/participle/cmd/participle
    
    the code of the file until where you have to start completion: package main

import (
	_ "embed" // For go:embed.
	"encodin
    
func (c *genLexerCmd) Run() error {
	rules := lexer.Rules{}
	err := json.NewDecoder(c.Lexer).Decode(&rules)
	if err != nil {
		return err
	}
	def, err := lexer.New(rules)
	if err != nil {
		return err
	}
	out := os.Stdout
	if c.Output != "" {
		out, err = os.Create(c.Output)
		if err != nil {
			return err
		}
		defer out.Close()
	}
	err = generateLexer(out, c.Package, def, c.Name, c.Tags)
	if err != nil {
		return err
	}
	return nil
}