package
module
Version:
v0.4.2
Opens a new window with list of versions in this module.
Published: Feb 21, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
ExpToStd
Detects functions from golang.org/x/exp/ that can be replaced by std functions.

Actual detections:
Usages
Inside golangci-lint
Recommended.
linters:
enable:
- exptostd
As a CLI
go install github.com/ldez/exptostd/cmd/exptostd@latest
./exptostd ./...
Examples
package foo
import (
"fmt"
"golang.org/x/exp/maps"
)
func foo(m map[string]string) {
clone := maps.Clone(m)
fmt.Println(clone)
}
It can be replaced by:
package foo
import (
"fmt"
"maps"
)
func foo(m map[string]string) {
clone := maps.Clone(m)
fmt.Println(clone)
}
References
Documentation
¶
Package exptostd It is an analyzer that detects functions from golang.org/x/exp/ that can be replaced by std functions.
NewAnalyzer create a new Analyzer.
Result is step analysis results.
Source Files
¶
Directories
¶
cmd
|
|
exptostd
Package main contains the basic runnable version of the linter.
|
Package main contains the basic runnable version of the linter. |
Click to show internal directories.
Click to hide internal directories.