Dagger
Search

golangci-lint

Fast linters runner for Go.

Installation

dagger install github.com/sagikazarmark/daggerverse/golangci-lint@v0.4.0

Entrypoint

Return Type
GolangciLint !
Arguments
NameTypeDescription
versionString Version (image tag) to use from the official image repository as a golangci-lint binary source.
imageString Custom image reference in "repository:tag" format to use as a golangci-lint binary source.
containerContainer Custom image reference in "repository:tag" format to use as a golangci-lint binary source.
disableCacheBoolean Disable mounting cache volumes.
linterCacheCacheVolume Linter cache volume to mount at ~/.cache/golangci-lint.
goVersionString Version (image tag) to use from the official image repository as a Go base container.
goContainerContainer Custom container to use as a Go base container.
disableGoCacheBoolean Disable mounting Go cache volumes.
Example
dagger -m github.com/sagikazarmark/daggerverse/golangci-lint@d814d0d7c421348f51cdda96870a05ca2aa8e96a call \
func (m *myModule) example() *GolangciLint  {
	return dag.
			GolangciLint()
}
@function
def example() -> dag.GolangciLint:
	return (
		dag.golangci_lint()
	)
@func()
example(): GolangciLint {
	return dag
		.golangciLint()
}

Types

GolangciLint 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/golangci-lint@d814d0d7c421348f51cdda96870a05ca2aa8e96a call \
 container
func (m *myModule) example() *Container  {
	return dag.
			GolangciLint().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.golangci_lint()
		.container()
	)
@func()
example(): Container {
	return dag
		.golangciLint()
		.container()
}

withLinterCache() 🔗

Mount a cache volume for golangci-lint cache.

Return Type
GolangciLint !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume !-No description provided
sourceDirectory -Identifier of the directory to use as the cache volume's root.
sharingScalar -Sharing mode of the cache volume.
Example
dagger -m github.com/sagikazarmark/daggerverse/golangci-lint@d814d0d7c421348f51cdda96870a05ca2aa8e96a call \
 with-linter-cache --cache VOLUME_NAME
func (m *myModule) example(cache *CacheVolume) *GolangciLint  {
	return dag.
			GolangciLint().
			WithLinterCache(cache)
}
@function
def example(cache: dagger.CacheVolume) -> dag.GolangciLint:
	return (
		dag.golangci_lint()
		.with_linter_cache(cache)
	)
@func()
example(cache: CacheVolume): GolangciLint {
	return dag
		.golangciLint()
		.withLinterCache(cache)
}

withModuleCache() 🔗

Mount a cache volume for Go module cache.

Return Type
GolangciLint !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume !-No description provided
sourceDirectory -Identifier of the directory to use as the cache volume's root.
sharingScalar -Sharing mode of the cache volume.
Example
dagger -m github.com/sagikazarmark/daggerverse/golangci-lint@d814d0d7c421348f51cdda96870a05ca2aa8e96a call \
 with-module-cache --cache VOLUME_NAME
func (m *myModule) example(cache *CacheVolume) *GolangciLint  {
	return dag.
			GolangciLint().
			WithModuleCache(cache)
}
@function
def example(cache: dagger.CacheVolume) -> dag.GolangciLint:
	return (
		dag.golangci_lint()
		.with_module_cache(cache)
	)
@func()
example(cache: CacheVolume): GolangciLint {
	return dag
		.golangciLint()
		.withModuleCache(cache)
}

withBuildCache() 🔗

Mount a cache volume for Go build cache.

Return Type
GolangciLint !
Arguments
NameTypeDefault ValueDescription
cacheCacheVolume !-No description provided
sourceDirectory -Identifier of the directory to use as the cache volume's root.
sharingScalar -Sharing mode of the cache volume.
Example
dagger -m github.com/sagikazarmark/daggerverse/golangci-lint@d814d0d7c421348f51cdda96870a05ca2aa8e96a call \
 with-build-cache --cache VOLUME_NAME
func (m *myModule) example(cache *CacheVolume) *GolangciLint  {
	return dag.
			GolangciLint().
			WithBuildCache(cache)
}
@function
def example(cache: dagger.CacheVolume) -> dag.GolangciLint:
	return (
		dag.golangci_lint()
		.with_build_cache(cache)
	)
@func()
example(cache: CacheVolume): GolangciLint {
	return dag
		.golangciLint()
		.withBuildCache(cache)
}

run() 🔗

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
configFile -Read custom configuration file.
timeoutString -Timeout for total work
verboseBoolean -Verbose output
rawArgs[String ! ] -Additional arguments to pass to the command.
Example
dagger -m github.com/sagikazarmark/daggerverse/golangci-lint@d814d0d7c421348f51cdda96870a05ca2aa8e96a call \
 run --source DIR_PATH
func (m *myModule) example(source *Directory) *Container  {
	return dag.
			GolangciLint().
			Run(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
	return (
		dag.golangci_lint()
		.run(source)
	)
@func()
example(source: Directory): Container {
	return dag
		.golangciLint()
		.run(source)
}