golangci-lint
Fast linters runner for Go.
Installation
dagger install github.com/sagikazarmark/daggerverse/golangci-lint@v0.4.0
Entrypoint
Return Type
GolangciLint !
Arguments
Name | Type | Description |
---|---|---|
version | String | Version (image tag) to use from the official image repository as a golangci-lint binary source. |
image | String | Custom image reference in "repository:tag" format to use as a golangci-lint binary source. |
container | Container | Custom image reference in "repository:tag" format to use as a golangci-lint binary source. |
disableCache | Boolean | Disable mounting cache volumes. |
linterCache | CacheVolume | Linter cache volume to mount at ~/.cache/golangci-lint. |
goVersion | String | Version (image tag) to use from the official image repository as a Go base container. |
goContainer | Container | Custom container to use as a Go base container. |
disableGoCache | Boolean | 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
Name | Type | Default Value | Description |
---|---|---|---|
cache | CacheVolume ! | - | No description provided |
source | Directory | - | Identifier of the directory to use as the cache volume's root. |
sharing | Scalar | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
cache | CacheVolume ! | - | No description provided |
source | Directory | - | Identifier of the directory to use as the cache volume's root. |
sharing | Scalar | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
cache | CacheVolume ! | - | No description provided |
source | Directory | - | Identifier of the directory to use as the cache volume's root. |
sharing | Scalar | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
config | File | - | Read custom configuration file. |
timeout | String | - | Timeout for total work |
verbose | Boolean | - | 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)
}