Skip to content

Commit 1ae1d51

Browse files
committed
Updates to namespaces
1 parent 291aa19 commit 1ae1d51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+83
-75
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cmd: $(CMD_DIR)
2121

2222
test:
2323
@${GO} mod tidy
24-
@${GO} test -v ./pkg/...
24+
@${GO} test ./pkg/...
2525

2626
$(CMD_DIR): dependencies mkdir
2727
@echo Build cmd $(notdir $@)

README.md

+3-3
File renamed without changes.

pkg/client/client_test.go renamed to client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package client_test
33
import (
44
"testing"
55

6-
"github.com/mutablelogic/go-client/pkg/client"
6+
"github.com/mutablelogic/go-client"
77
"github.com/stretchr/testify/assert"
88
)
99

File renamed without changes.

cmd/cli/elevenlabs.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"regexp"
77
"strings"
88

9-
// Package imports
10-
"github.com/mutablelogic/go-client/pkg/client"
9+
// Packages
10+
"github.com/mutablelogic/go-client"
1111
"github.com/mutablelogic/go-client/pkg/elevenlabs"
1212
)
1313

cmd/cli/homeassistant.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
// Packages
5-
"github.com/mutablelogic/go-client/pkg/client"
5+
"github.com/mutablelogic/go-client"
66
"github.com/mutablelogic/go-client/pkg/homeassistant"
77
)
88

cmd/cli/ipify.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
// Packages
5-
"github.com/mutablelogic/go-client/pkg/client"
5+
"github.com/mutablelogic/go-client"
66
"github.com/mutablelogic/go-client/pkg/ipify"
77
)
88

cmd/cli/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"path"
88

99
// Packages
10-
"github.com/mutablelogic/go-client/pkg/client"
10+
"github.com/mutablelogic/go-client"
1111
"github.com/pkg/errors"
1212
)
1313

cmd/cli/mistral.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
// Package imports
5-
"github.com/mutablelogic/go-client/pkg/client"
5+
"github.com/mutablelogic/go-client"
66
"github.com/mutablelogic/go-client/pkg/mistral"
77
"github.com/mutablelogic/go-client/pkg/openai/schema"
88
)

cmd/cli/newsapi.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
// Package imports
5-
"github.com/mutablelogic/go-client/pkg/client"
5+
"github.com/mutablelogic/go-client"
66
"github.com/mutablelogic/go-client/pkg/newsapi"
77
)
88

cmd/cli/ollama.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
// Package imports
5-
"github.com/mutablelogic/go-client/pkg/client"
5+
"github.com/mutablelogic/go-client"
66
"github.com/mutablelogic/go-client/pkg/ollama"
77
)
88

cmd/cli/openai.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"regexp"
99
"strconv"
1010

11-
"github.com/mutablelogic/go-client/pkg/client"
11+
"github.com/mutablelogic/go-client"
1212
"github.com/mutablelogic/go-client/pkg/openai"
1313
)
1414

pkg/client/doc.go renamed to doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gateway-specific clients. Basic usage:
55
package main
66
77
import (
8-
client "github.com/mutablelogic/go-client/pkg/client"
8+
client "github.com/mutablelogic/go-client"
99
)
1010
1111
func main() {

go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/mutablelogic/go-client
22

3-
go 1.21
3+
go 1.22
4+
5+
toolchain go1.22.3
46

57
require (
68
github.com/andreburgaud/crypt2go v1.5.0

pkg/client/payload.go renamed to payload.go

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http"
88
"strconv"
99

10+
// Packages
1011
"github.com/mutablelogic/go-client/pkg/multipart"
1112
)
1213

pkg/client/payload_test.go renamed to payload_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ import (
44
"testing"
55

66
// Packages
7-
"github.com/mutablelogic/go-client/pkg/client"
7+
"github.com/mutablelogic/go-client"
88
"github.com/stretchr/testify/assert"
99
)
1010

1111
func Test_payload_001(t *testing.T) {
1212
assert := assert.New(t)
13-
payload := client.NewPayload(client.ContentTypeBinary)
13+
payload := client.NewRequest()
1414
assert.NotNil(payload)
1515
assert.Equal("GET", payload.Method())
16-
assert.Equal(client.ContentTypeJson, payload.Type())
17-
assert.Equal(client.ContentTypeBinary, payload.Accept())
16+
assert.Equal(client.ContentTypeAny, payload.Accept())
1817
}

pkg/bitwarden/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ bitwarden implements an API client for bitwarden
44
package bitwarden
55

66
import (
7-
// Packages
87
"runtime"
98

10-
"github.com/mutablelogic/go-client/pkg/client"
9+
// Packages
10+
"github.com/mutablelogic/go-client"
1111

1212
// Namespace imports
1313
. "github.com/djthorpe/go-errors"

pkg/bitwarden/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"testing"
77

88
// Packages
9+
opts "github.com/mutablelogic/go-client"
910
bitwarden "github.com/mutablelogic/go-client/pkg/bitwarden"
10-
opts "github.com/mutablelogic/go-client/pkg/client"
1111
assert "github.com/stretchr/testify/assert"
1212
)
1313

pkg/bitwarden/crypto_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"encoding/json"
55
"testing"
66

7+
// Packages
78
"github.com/mutablelogic/go-client/pkg/bitwarden"
89
"github.com/stretchr/testify/assert"
910
)

pkg/bitwarden/key_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"testing"
66

7+
// Packages
78
"github.com/mutablelogic/go-client/pkg/bitwarden"
89
"github.com/stretchr/testify/assert"
910
)

pkg/elevenlabs/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package elevenlabs
55

66
import (
77
// Packages
8-
"github.com/mutablelogic/go-client/pkg/client"
8+
"github.com/mutablelogic/go-client"
99
)
1010

1111
///////////////////////////////////////////////////////////////////////////////

pkg/elevenlabs/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
elevenlabs "github.com/mutablelogic/go-client/pkg/elevenlabs"
1010
assert "github.com/stretchr/testify/assert"
1111
)

pkg/elevenlabs/text_to_speech.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"io"
55

66
// Packages
7-
"github.com/mutablelogic/go-client/pkg/client"
7+
"github.com/mutablelogic/go-client"
88
)
99

1010
///////////////////////////////////////////////////////////////////////////////

pkg/elevenlabs/voice.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package elevenlabs
22

33
import (
4-
54
// Packages
6-
75
"github.com/djthorpe/go-errors"
8-
"github.com/mutablelogic/go-client/pkg/client"
6+
"github.com/mutablelogic/go-client"
97
)
108

119
///////////////////////////////////////////////////////////////////////////////

pkg/elevenlabs/voice_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77

88
// Packages
9-
opts "github.com/mutablelogic/go-client/pkg/client"
9+
opts "github.com/mutablelogic/go-client"
1010
elevenlabs "github.com/mutablelogic/go-client/pkg/elevenlabs"
1111
assert "github.com/stretchr/testify/assert"
1212
)

pkg/homeassistant/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package homeassistant
66

77
import (
88
// Packages
9-
"github.com/mutablelogic/go-client/pkg/client"
9+
"github.com/mutablelogic/go-client"
1010
)
1111

1212
///////////////////////////////////////////////////////////////////////////////

pkg/homeassistant/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
homeassistant "github.com/mutablelogic/go-client/pkg/homeassistant"
1010
assert "github.com/stretchr/testify/assert"
1111
)

pkg/homeassistant/events.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package homeassistant
22

3-
import "github.com/mutablelogic/go-client/pkg/client"
3+
import "github.com/mutablelogic/go-client"
44

55
///////////////////////////////////////////////////////////////////////////////
66
// TYPES

pkg/homeassistant/events_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
homeassistant "github.com/mutablelogic/go-client/pkg/homeassistant"
1010
assert "github.com/stretchr/testify/assert"
1111
)

pkg/homeassistant/health_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
homeassistant "github.com/mutablelogic/go-client/pkg/homeassistant"
1010
assert "github.com/stretchr/testify/assert"
1111
)

pkg/homeassistant/states.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import (
55
"strings"
66
"time"
77

8-
"github.com/mutablelogic/go-client/pkg/client"
8+
// Packages
9+
"github.com/mutablelogic/go-client"
910
)
1011

1112
///////////////////////////////////////////////////////////////////////////////

pkg/homeassistant/states_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
homeassistant "github.com/mutablelogic/go-client/pkg/homeassistant"
1010
assert "github.com/stretchr/testify/assert"
1111
)

pkg/ipify/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/url"
99

1010
// Packages
11-
"github.com/mutablelogic/go-client/pkg/client"
11+
"github.com/mutablelogic/go-client"
1212
)
1313

1414
///////////////////////////////////////////////////////////////////////////////

pkg/ipify/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
ipify "github.com/mutablelogic/go-client/pkg/ipify"
1010
assert "github.com/stretchr/testify/assert"
1111
)

pkg/mistral/chat.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package mistral
22

33
import (
4-
client "github.com/mutablelogic/go-client/pkg/client"
4+
// Packages
5+
client "github.com/mutablelogic/go-client"
56
schema "github.com/mutablelogic/go-client/pkg/openai/schema"
67

78
// Namespace imports

pkg/mistral/chat_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
mistral "github.com/mutablelogic/go-client/pkg/mistral"
10-
"github.com/mutablelogic/go-client/pkg/openai/schema"
10+
schema "github.com/mutablelogic/go-client/pkg/openai/schema"
1111
assert "github.com/stretchr/testify/assert"
1212
)
1313

pkg/mistral/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package mistral
55

66
import (
77
// Packages
8-
"github.com/mutablelogic/go-client/pkg/client"
8+
"github.com/mutablelogic/go-client"
99
)
1010

1111
///////////////////////////////////////////////////////////////////////////////

pkg/mistral/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66

77
// Packages
8-
opts "github.com/mutablelogic/go-client/pkg/client"
8+
opts "github.com/mutablelogic/go-client"
99
mistral "github.com/mutablelogic/go-client/pkg/mistral"
1010
assert "github.com/stretchr/testify/assert"
1111
)

pkg/mistral/embedding.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package mistral
22

33
import (
44
// Packages
5-
client "github.com/mutablelogic/go-client/pkg/client"
5+
client "github.com/mutablelogic/go-client"
66
schema "github.com/mutablelogic/go-client/pkg/openai/schema"
77

88
// Namespace imports

pkg/mistral/embedding_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77

88
// Packages
9-
opts "github.com/mutablelogic/go-client/pkg/client"
9+
opts "github.com/mutablelogic/go-client"
1010
mistral "github.com/mutablelogic/go-client/pkg/mistral"
1111
assert "github.com/stretchr/testify/assert"
1212
)

0 commit comments

Comments
 (0)