Skip to content

Commit

Permalink
Moved to go 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
seroukhov committed Apr 3, 2021
1 parent 07daa7d commit 6fe0a29
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 24 deletions.
23 changes: 11 additions & 12 deletions container/Container.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"

cconfig "github.com/pip-services3-go/pip-services3-commons-go/config"
cconv "github.com/pip-services3-go/pip-services3-commons-go/convert"
cerr "github.com/pip-services3-go/pip-services3-commons-go/errors"
crefer "github.com/pip-services3-go/pip-services3-commons-go/refer"
cbuild "github.com/pip-services3-go/pip-services3-components-go/build"
Expand Down Expand Up @@ -59,19 +60,17 @@ Example
param2: XYZ
============================
container := NewEmptyContainer();
container.AddFactory(newMyComponentFactory());
container := NewEmptyContainer()
container.AddFactory(newMyComponentFactory())
parameters := NewConfigParamsFromValue(process.env);
container.ReadConfigFromFile("123", "./config/config.yml", parameters);
parameters := NewConfigParamsFromValue(process.env)
container.ReadConfigFromFile("123", "./config/config.yml", parameters)
container.Open("123", (err) => {
console.Log("Container is opened");
...
container.Close("123", (err) => {
console.Log("Container is closed");
});
});
err := container.Open("123")
ftm.Println("Container is opened")
...
err = container.Close("123")
fmt.Println("Container is closed")
*/
type Container struct {
logger log.ILogger
Expand Down Expand Up @@ -281,7 +280,7 @@ func (c *Container) Close(correlationId string) error {
if r := recover(); r != nil {
err, ok := r.(error)
if !ok {
msg, _ := r.(string)
msg := cconv.StringConverter.ToString(r)
err = errors.New(msg)
}
c.logger.Error(correlationId, err, "Failed to stop container")
Expand Down
9 changes: 4 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
module github.com/pip-services3-go/pip-services3-container-go

go 1.12
go 1.16

require (
github.com/pip-services3-go/pip-services3-commons-go v1.0.3
github.com/pip-services3-go/pip-services3-components-go v1.0.5
github.com/stretchr/testify v1.4.0
gopkg.in/yaml.v2 v2.4.0 // indirect
github.com/pip-services3-go/pip-services3-commons-go v1.1.0
github.com/pip-services3-go/pip-services3-components-go v1.1.0
github.com/stretchr/testify v1.7.0
)
7 changes: 0 additions & 7 deletions index.go.bak

This file was deleted.

0 comments on commit 6fe0a29

Please sign in to comment.