Skip to content

Commit 214dfbc

Browse files
author
paulknebel
committed
feat: added soft wrapper around some internal functions
1 parent 3851798 commit 214dfbc

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

pkg/api/api.go

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
package api
22

33
import (
4-
"bytes"
54
"context"
6-
"fmt"
7-
"path/filepath"
8-
"regexp"
9-
"strconv"
10-
"strings"
11-
"time"
125

136
"github.com/sqlc-dev/sqlc/internal/cmd"
147
)
@@ -19,25 +12,14 @@ type Options struct {
1912
Options *cmd.Options
2013
}
2114

22-
type Diagnostic struct {
23-
File string
24-
Line int
25-
Column int
26-
Severity string // "error" | "warning" | "info"
27-
Message string
28-
Raw string
29-
}
30-
31-
type Report struct {
32-
Stdout string
33-
Stderr string
34-
Diagnostics []Diagnostic
35-
}
36-
3715
func Generate(ctx context.Context, opt Options) (map[string]string, error) {
3816
return cmd.Generate(ctx, opt.Dir, opt.Filename, opt.Options)
3917
}
4018

4119
func Verify(ctx context.Context, opt Options) error {
4220
return cmd.Verify(ctx, opt.Dir, opt.Filename, opt.Options)
4321
}
22+
23+
func Vet(ctx context.Context, opt Options) error {
24+
return cmd.Vet(ctx, opt.Dir, opt.Filename, opt.Options)
25+
}

0 commit comments

Comments
 (0)