Skip to content

Commit afe1d5b

Browse files
committed
Merge branch 'master' into noinputguard
2 parents a12b9d8 + 89a5c9e commit afe1d5b

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

.golangci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ linters-settings:
247247
lll:
248248
# max line length, lines longer will be reported. Default is 120.
249249
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
250-
line-length: 120
250+
line-length: 160
251251
# tab width in spaces. Default to 1.
252-
tab-width: 1
252+
tab-width: 4
253253
maligned:
254254
# print struct with more effective memory layout or not, false by default
255255
suggest-new: true
@@ -370,6 +370,7 @@ linters:
370370
- goprintffuncname
371371
- ineffassign
372372
- interfacer
373+
- lll
373374
- maligned
374375
- misspell
375376
- nakedret
@@ -379,6 +380,8 @@ linters:
379380
- rowserrcheck
380381
- scopelint
381382
- sqlclosecheck
383+
- staticcheck
384+
- stylecheck
382385
- unconvert
383386
- unparam
384387
- whitespace
@@ -392,12 +395,9 @@ linters:
392395
- godox
393396
- goerr113
394397
- gomnd
395-
- lll
396398
- nestif
397399
- nlreturn
398-
- staticcheck
399400
- structcheck
400-
- stylecheck
401401
- testpackage
402402
- unused
403403

factory.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func NewFactory(config ...FactoryConfig) *Factory {
5454
// Register registers a component so that it can be instantiated at run-time
5555
func (f *Factory) Register(componentName string, constructor Constructor) error {
5656
if _, exists := f.registry[componentName]; exists {
57-
return fmt.Errorf("Registry error: component '%s' already registered", componentName)
57+
return fmt.Errorf("registry error: component '%s' already registered", componentName)
5858
}
5959

6060
f.registry[componentName] = registryEntry{
@@ -70,7 +70,7 @@ func (f *Factory) Register(componentName string, constructor Constructor) error
7070
// Annotate adds human-readable documentation for a component to the runtime
7171
func (f *Factory) Annotate(componentName string, annotation Annotation) error {
7272
if _, exists := f.registry[componentName]; !exists {
73-
return fmt.Errorf("Registry annotation error: component '%s' is not registered", componentName)
73+
return fmt.Errorf("registry annotation error: component '%s' is not registered", componentName)
7474
}
7575

7676
entry := f.registry[componentName]
@@ -89,7 +89,7 @@ func (f *Factory) Unregister(componentName string) error {
8989
return nil
9090
}
9191

92-
return fmt.Errorf("Registry error: component '%s' is not registered", componentName)
92+
return fmt.Errorf("registry error: component '%s' is not registered", componentName)
9393
}
9494

9595
// Create creates a new instance of a component registered under a specific name.
@@ -98,7 +98,7 @@ func (f *Factory) Create(componentName string) (interface{}, error) {
9898
return info.Constructor()
9999
}
100100

101-
return nil, fmt.Errorf("Factory error: component '%s' does not exist", componentName)
101+
return nil, fmt.Errorf("factory error: component '%s' does not exist", componentName)
102102
}
103103

104104
// // UpdateComponentInfo extracts run-time information about a

graph.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package goflow implements a dataflow and flow-based programming library for Go.
12
package goflow
23

34
import (
@@ -83,7 +84,7 @@ func (n *Graph) Add(name string, c interface{}) error {
8384
_, isGraph := c.(Graph)
8485

8586
if !isComponent && !isGraph {
86-
return fmt.Errorf("Could not add process '%s': instance is neither Component nor Graph", name)
87+
return fmt.Errorf("could not add process '%s': instance is neither Component nor Graph", name)
8788
}
8889
// Add to the map of processes
8990
n.procs[name] = c
@@ -112,7 +113,7 @@ func (n *Graph) AddNew(processName string, componentName string, f *Factory) err
112113
// the graph. Then it drops the process itself.
113114
func (n *Graph) Remove(processName string) error {
114115
if _, exists := n.procs[processName]; !exists {
115-
return fmt.Errorf("Could not remove process: '%s' does not exist", processName)
116+
return fmt.Errorf("could not remove process: '%s' does not exist", processName)
116117
}
117118

118119
delete(n.procs, processName)

graph_connect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type connection struct {
3131
buffer int
3232
}
3333

34-
// Connect connects a sender to a receiver and creates a channel between them using BufferSize configuratio nof the graph.
34+
// Connect a sender to a receiver and create a channel between them using BufferSize graph configuration.
3535
// Normally such a connection is unbuffered but you can change by setting flow.DefaultBufferSize > 0 or
3636
// by using ConnectBuf() function instead.
3737
// It returns true on success or panics and returns false if error occurs.

0 commit comments

Comments
 (0)