mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Use _oss_stubs.go and _ent_stubs.go as suffixes instead of _oss.go and _ent.go. (#22035)
This commit is contained in:
@@ -50,12 +50,12 @@ func main() {
|
|||||||
|
|
||||||
// Read the file and figure out if we need to do anything.
|
// Read the file and figure out if we need to do anything.
|
||||||
inputFile := os.Getenv("GOFILE")
|
inputFile := os.Getenv("GOFILE")
|
||||||
if !strings.HasSuffix(inputFile, "_oss.go") {
|
if !strings.HasSuffix(inputFile, "_stubs_oss.go") {
|
||||||
fatal(fmt.Errorf("stubmaker should only be invoked from files ending in _oss.go"))
|
fatal(fmt.Errorf("stubmaker should only be invoked from files ending in _stubs_oss.go"))
|
||||||
}
|
}
|
||||||
|
|
||||||
baseFilename := strings.TrimSuffix(inputFile, "_oss.go")
|
baseFilename := strings.TrimSuffix(inputFile, "_stubs_oss.go")
|
||||||
outputFile := baseFilename + "_ent.go"
|
outputFile := baseFilename + "_stubs_ent.go"
|
||||||
b, err := os.ReadFile(inputFile)
|
b, err := os.ReadFile(inputFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fatal(err)
|
fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user