From ecd21f2c7784a66bdacfa5c9c6e3c0285ff362e1 Mon Sep 17 00:00:00 2001 From: Jiyong Huang Date: Wed, 11 Jan 2023 09:18:17 +0800 Subject: [PATCH] fix: fix typos Signed-off-by: Jiyong Huang --- internal/conf/path.go | 4 ++-- internal/plugin/portable/manager.go | 4 ++-- internal/plugin/portable/runtime/connection_test.go | 4 ++-- internal/processor/rule.go | 6 +++--- internal/processor/stream.go | 8 ++++---- internal/server/server.go | 2 +- internal/topo/topotest/mocknode/mock_sink.go | 4 ++-- test/plugins/service/server.go | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/internal/conf/path.go b/internal/conf/path.go index 33ec3ff047..c175514416 100644 --- a/internal/conf/path.go +++ b/internal/conf/path.go @@ -1,4 +1,4 @@ -// Copyright 2021 EMQ Technologies Co., Ltd. +// Copyright 2021-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -73,7 +73,7 @@ func absolutePath(loc string) (dir string, err error) { } } if 0 == len(dir) { - return "", fmt.Errorf("location %s is not allowed for absolue mode", loc) + return "", fmt.Errorf("location %s is not allowed for absolute mode", loc) } return dir, nil } diff --git a/internal/plugin/portable/manager.go b/internal/plugin/portable/manager.go index 5404efad99..93ac2ac5c4 100644 --- a/internal/plugin/portable/manager.go +++ b/internal/plugin/portable/manager.go @@ -1,4 +1,4 @@ -// Copyright 2021-2022 EMQ Technologies Co., Ltd. +// Copyright 2021-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -333,7 +333,7 @@ func (m *Manager) install(name, src string, shellParas []string) (resultErr erro if err != nil { return fmt.Errorf(`err:%v stdout:%s stderr:%s`, err, outb.String(), errb.String()) } else { - conf.Log.Infof(`install script ouput: %s`, outb.String()) + conf.Log.Infof(`install script output: %s`, outb.String()) } } return m.doRegister(name, pi, false) diff --git a/internal/plugin/portable/runtime/connection_test.go b/internal/plugin/portable/runtime/connection_test.go index 0579fff205..582e5ab6ab 100644 --- a/internal/plugin/portable/runtime/connection_test.go +++ b/internal/plugin/portable/runtime/connection_test.go @@ -1,4 +1,4 @@ -// Copyright 2021-2022 EMQ Technologies Co., Ltd. +// Copyright 2021-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -248,7 +248,7 @@ func (r *mockControlClient) Run() error { return fmt.Errorf("cannot receive on rep socket: %s", err.Error()) } if !reflect.DeepEqual(msg, okMsg) { - return fmt.Errorf("control client recieve %s but expect %s", string(msg), string(okMsg)) + return fmt.Errorf("control client receive %s but expect %s", string(msg), string(okMsg)) } err = r.sock.Send(okMsg) if err != nil { diff --git a/internal/processor/rule.go b/internal/processor/rule.go index 343fe67638..f9c0270eae 100644 --- a/internal/processor/rule.go +++ b/internal/processor/rule.go @@ -1,4 +1,4 @@ -// Copyright 2021-2022 EMQ Technologies Co., Ltd. +// Copyright 2021-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,11 +34,11 @@ type RuleProcessor struct { func NewRuleProcessor() *RuleProcessor { err, db := store.GetKV("rule") if err != nil { - panic(fmt.Sprintf("Can not initalize store for the rule processor at path 'rule': %v", err)) + panic(fmt.Sprintf("Can not initialize store for the rule processor at path 'rule': %v", err)) } err, ruleStatusDb := store.GetKV("ruleStatus") if err != nil { - panic(fmt.Sprintf("Can not initalize store for the rule processor at path 'rule': %v", err)) + panic(fmt.Sprintf("Can not initialize store for the rule processor at path 'rule': %v", err)) } processor := &RuleProcessor{ db: db, diff --git a/internal/processor/stream.go b/internal/processor/stream.go index e0516ed840..c2dd05668a 100644 --- a/internal/processor/stream.go +++ b/internal/processor/stream.go @@ -1,4 +1,4 @@ -// Copyright 2021-2022 EMQ Technologies Co., Ltd. +// Copyright 2021-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,15 +42,15 @@ type StreamProcessor struct { func NewStreamProcessor() *StreamProcessor { err, db := store.GetKV("stream") if err != nil { - panic(fmt.Sprintf("Can not initalize store for the stream processor at path 'stream': %v", err)) + panic(fmt.Sprintf("Can not initialize store for the stream processor at path 'stream': %v", err)) } err, streamDb := store.GetKV("streamStatus") if err != nil { - panic(fmt.Sprintf("Can not initalize store for the stream processor at path 'stream': %v", err)) + panic(fmt.Sprintf("Can not initialize store for the stream processor at path 'stream': %v", err)) } err, tableDb := store.GetKV("tableStatus") if err != nil { - panic(fmt.Sprintf("Can not initalize store for the stream processor at path 'stream': %v", err)) + panic(fmt.Sprintf("Can not initialize store for the stream processor at path 'stream': %v", err)) } processor := &StreamProcessor{ db: db, diff --git a/internal/server/server.go b/internal/server/server.go index c2815f4ffc..cc50edcf34 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -1,4 +1,4 @@ -// Copyright 2022 EMQ Technologies Co., Ltd. +// Copyright 2022-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/topo/topotest/mocknode/mock_sink.go b/internal/topo/topotest/mocknode/mock_sink.go index 0e48ac7d34..83f4db3efe 100644 --- a/internal/topo/topotest/mocknode/mock_sink.go +++ b/internal/topo/topotest/mocknode/mock_sink.go @@ -1,4 +1,4 @@ -// Copyright 2021 EMQ Technologies Co., Ltd. +// Copyright 2021-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ func (m *MockSink) Collect(ctx api.StreamContext, item interface{}) error { logger.Debugf("mock sink receive %s", item) m.results = append(m.results, v) } else { - logger.Info("mock sink tranform data error: %v", err) + logger.Info("mock sink transform data error: %v", err) } return nil } diff --git a/test/plugins/service/server.go b/test/plugins/service/server.go index 3c6bdff710..9be3437932 100644 --- a/test/plugins/service/server.go +++ b/test/plugins/service/server.go @@ -1,4 +1,4 @@ -// Copyright 2021 EMQ Technologies Co., Ltd. +// Copyright 2021-2023 EMQ Technologies Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ var count = 0 type Sensor struct { Temperature int `json: "temperature""` - Humidity int `json: "humidiy"` + Humidity int `json: "humidity"` } var s = &Sensor{}