Skip to content

Commit

Permalink
updated dsql location
Browse files Browse the repository at this point in the history
  • Loading branch information
gopherus committed Aug 2, 2023
1 parent 5141c5f commit 355e491
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/options/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ func (g *Generate) Init() error {

func (g *Generate) DSQLLocation() string {
_, name := url.Split(g.SourceURL(), file.Scheme)

pkg := ""
if len(g.Packages) > 0 {
pkg = g.Packages[0]
name = strings.Title(pkg) + "_" + strings.ToLower(g.Operation)
}

if ext := path.Ext(name); ext != "" {
name = name[:len(name)-len(ext)]
}
Expand Down

0 comments on commit 355e491

Please sign in to comment.