mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-08 15:14:00 -05:00
fix: fix spellings in comments (#561)
This commit is contained in:
@@ -61,7 +61,7 @@ func (h *ValueTextHandler) WithGroup(name string) slog.Handler {
|
||||
}
|
||||
|
||||
// Handle formats its argument [Record] as a single line of space-separated values.
|
||||
// Example output format: 2024-11-12T15:08:11.451377-08:00 INFO "Initalized 0 sources.\n"
|
||||
// Example output format: 2024-11-12T15:08:11.451377-08:00 INFO "Initialized 0 sources.\n"
|
||||
func (h *ValueTextHandler) Handle(ctx context.Context, r slog.Record) error {
|
||||
buf := make([]byte, 0, 1024)
|
||||
|
||||
@@ -86,7 +86,7 @@ func (h *ValueTextHandler) Handle(ctx context.Context, r slog.Record) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// appendAttr is reponsible for formatting a single attribute
|
||||
// appendAttr is responsible for formatting a single attribute
|
||||
func (h *ValueTextHandler) appendAttr(buf []byte, a slog.Attr) []byte {
|
||||
// Resolve the Attr's value before doing anything else.
|
||||
a.Value = a.Value.Resolve()
|
||||
|
||||
@@ -250,7 +250,7 @@ func (rr resultResponse) Render(w http.ResponseWriter, r *http.Request) error {
|
||||
|
||||
var _ render.Renderer = &errResponse{} // Renderer interface for managing response payloads.
|
||||
|
||||
// newErrResponse is a helper function initalizing an ErrResponse
|
||||
// newErrResponse is a helper function initializing an ErrResponse
|
||||
func newErrResponse(err error, code int) *errResponse {
|
||||
return &errResponse{
|
||||
Err: err,
|
||||
|
||||
@@ -116,7 +116,7 @@ func TestToolsetEndpoint(t *testing.T) {
|
||||
for _, name := range tc.want.tools {
|
||||
_, ok := m.ToolsManifest[name]
|
||||
if !ok {
|
||||
t.Errorf("%q tool not found in manfiest", name)
|
||||
t.Errorf("%q tool not found in manifest", name)
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -204,7 +204,7 @@ func TestToolGetEndpoint(t *testing.T) {
|
||||
for _, name := range tc.want.tools {
|
||||
_, ok := m.ToolsManifest[name]
|
||||
if !ok {
|
||||
t.Errorf("%q tool not found in manfiest", name)
|
||||
t.Errorf("%q tool not found in manifest", name)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -149,7 +149,7 @@ func (t Tool) Invoke(ctx context.Context, params tools.ParamValues) ([]any, erro
|
||||
return nil, fmt.Errorf("unable to close rows: %w", err)
|
||||
}
|
||||
|
||||
// Check if error occured during iteration
|
||||
// Check if error occurred during iteration
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ func (p ParamValues) AsReversedMap() map[any]string {
|
||||
return params
|
||||
}
|
||||
|
||||
// AsMapByOrderedKeys returns a map of a key's position to it's value, as neccesary for Spanner PSQL.
|
||||
// AsMapByOrderedKeys returns a map of a key's position to it's value, as necessary for Spanner PSQL.
|
||||
// Example { $1 -> "value1", $2 -> "value2" }
|
||||
func (p ParamValues) AsMapByOrderedKeys() map[string]interface{} {
|
||||
params := make(map[string]interface{})
|
||||
|
||||
Reference in New Issue
Block a user