imageparser

package
v5.21.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package imageparser provides utilities for parsing container image references from Dockerfiles. This package enables extracting image references embedded in Dockerfile FROM directives, allowing Go code to stay synchronized with Dependabot updates automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseImageFromDockerfile

func ParseImageFromDockerfile(dockerfileContent, pattern, imageName string) string

ParseImageFromDockerfile extracts a container image reference from a Dockerfile using the provided regex pattern. This ensures Go code stays in sync with Dependabot updates automatically. Panics if the Dockerfile cannot be parsed - this catches embedding/format issues at init time.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL