Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoile committed Apr 25, 2024
1 parent c937fc0 commit 14dbcb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/transcriber/call/transcriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Transcriber struct {

func NewTranscriber(cfg config.CallTranscriberConfig) (*Transcriber, error) {
if err := cfg.IsValid(true); err != nil {
if apiClient, err2 := CreateApiClient(cfg); err2 == nil {
if apiClient, err2 := CreateAPIClient(cfg); err2 == nil {
t := &Transcriber{cfg: cfg, apiClient: apiClient}
if err3 := t.ReportJobFailure(fmt.Sprintf("failed to validate config: %s", err.Error())); err3 != nil {
slog.Error("failed to report job failure", slog.String("err", err3.Error()))
Expand All @@ -63,7 +63,7 @@ func NewTranscriber(cfg config.CallTranscriberConfig) (*Transcriber, error) {
}

// We have already validated the cfg above, so no error.
apiClient, _ := CreateApiClient(cfg)
apiClient, _ := CreateAPIClient(cfg)

t := &Transcriber{
cfg: cfg,
Expand All @@ -78,7 +78,7 @@ func NewTranscriber(cfg config.CallTranscriberConfig) (*Transcriber, error) {
return t, nil
}

func CreateApiClient(cfg config.CallTranscriberConfig) (*model.Client4, error) {
func CreateAPIClient(cfg config.CallTranscriberConfig) (*model.Client4, error) {
if err := cfg.IsValid(true); err != nil {
if cfg.SiteURL == "" {
return nil, fmt.Errorf("SiteURL cannot be empty")
Expand Down

0 comments on commit 14dbcb8

Please sign in to comment.