Skip to content

Replace global containers by encapsulating state #1

Description

@Abathargh

Replace every global container with a locally encapsulated/passed one. Examples:

type A struct {
   state ..
}

... subsequent functions become methods on A
var readChan  = make(chan ...)
var writeChan = make(chan ...)

func() {
  var container ...
  
  for{
    select {
      op := <-readChan
        ...
      op :=<-writeChan
        ...  
  }
}()

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions