From 08aa10d080d70c7b43f50e1da2222c89f3a4a391 Mon Sep 17 00:00:00 2001 From: lipandeng Date: Mon, 30 Dec 2024 20:46:28 +0800 Subject: [PATCH] chore: adjust typos --- .licenserc.yaml | 17 +++++++++++++++++ _typos.toml | 4 ---- compose/chain_branch_test.go | 6 +++--- compose/runnable.go | 4 ++-- schema/message.go | 2 +- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/.licenserc.yaml b/.licenserc.yaml index 6046e12..c667bad 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -3,6 +3,23 @@ header: spdx-id: Apache-2.0 copyright-owner: CloudWeGo Authors + template: | + /* + * Copyright {{ .Year }} CloudWeGo Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + paths: - '**/*.go' - '**/*.s' diff --git a/_typos.toml b/_typos.toml index b7c848d..b471b8a 100644 --- a/_typos.toml +++ b/_typos.toml @@ -6,10 +6,6 @@ Invokable = "Invokable" invokable = "invokable" InvokableLambda = "InvokableLambda" InvokableRun = "InvokableRun" -outter = "outter" -Opion = "Opion" -TOpion = "TOpion" -renderring = "renderring" [files] extend-exclude = ["go.mod", "go.sum", "check_branch_name.sh"] diff --git a/compose/chain_branch_test.go b/compose/chain_branch_test.go index 403595a..bcf3c75 100644 --- a/compose/chain_branch_test.go +++ b/compose/chain_branch_test.go @@ -63,9 +63,9 @@ func TestChainBranch(t *testing.T) { return in + in + in, nil }))) - outter := NewChain[string, string]() - outter.AppendGraph(inner) - _, err := outter.Compile(context.Background()) + outer := NewChain[string, string]() + outer.AppendGraph(inner) + _, err := outer.Compile(context.Background()) assert.Error(t, err) }) diff --git a/compose/runnable.go b/compose/runnable.go index fdb8cbf..b8f8546 100644 --- a/compose/runnable.go +++ b/compose/runnable.go @@ -314,8 +314,8 @@ func streamByInvoke[I, O, TOption any](i Invoke[I, O, TOption]) Stream[I, O, TOp } } -func streamByCollect[I, O, TOpion any](c Collect[I, O, TOpion]) Stream[I, O, TOpion] { - return func(ctx context.Context, input I, opts ...TOpion) (output *schema.StreamReader[O], err error) { +func streamByCollect[I, O, TOption any](c Collect[I, O, TOption]) Stream[I, O, TOption] { + return func(ctx context.Context, input I, opts ...TOption) (output *schema.StreamReader[O], err error) { action := actionStreamByCollect srInput := schema.StreamReaderFromArray([]I{input}) diff --git a/schema/message.go b/schema/message.go index c99f840..f08bdde 100644 --- a/schema/message.go +++ b/schema/message.go @@ -340,7 +340,7 @@ func formatContent(content string, vs map[string]any, formatType FormatType) (st } } -// Format returns the messages after renderring by the given formatType. +// Format returns the messages after rendering by the given formatType. // e.g. // // msg := schema.UserMessage("hello world, {name}")