package cli

import (
	
	
	
	
	

	
	
	
)

func ( context.Context,  []string, ,  io.Writer) error {
	 := flag.NewFlagSet("diff", flag.ContinueOnError)
	.SetOutput()
	var  commonFlags
	.register()
	.Usage = func() {
		_, _ = fmt.Fprintln(, "Usage: goship diff [flags] [targets...]")
		.PrintDefaults()
	}
	if  := .Parse();  != nil {
		if errors.Is(, flag.ErrHelp) {
			return nil
		}
		return ExitError{Code: 2}
	}

	,  := loadRuntime(, , &, )
	if  != nil {
		return 
	}
	,  := release.Inspect(, release.InspectOptions{
		VCS:       .vcs,
		Workspace: .workspace,
		Rev:       .rev,
		APIDiff:   true,
		Filter: modgraph.FilterOptions{
			Include:         .cfg.Include,
			Exclude:         .cfg.Exclude,
			ExcludeVersions: .cfg.ExcludeVersions,
			Targets:         .Args(),
		},
	})
	if  != nil {
		return 
	}
	return .renderer.RenderDiff(, ui.Format(.format))
}