Ver código fonte

fix: fix typos

Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Jiyong Huang 2 anos atrás
pai
commit
ecd21f2c77

+ 2 - 2
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
 }

+ 2 - 2
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)

+ 2 - 2
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 {

+ 3 - 3
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,

+ 4 - 4
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,

+ 1 - 1
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.

+ 2 - 2
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
 }

+ 2 - 2
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{}