diff --git a/LICENSE.md b/LICENSE.md index 9a5ef68..0919dea 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 RetailDriver LLC +Copyright (c) 2019-2020 RetailDriver LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 555b875..b744f53 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ ## Message Gateway Transport Library [![Build Status](https://github.com/retailcrm/mg-transport-core/workflows/ci/badge.svg)](https://github.com/retailcrm/mg-transport-core/actions?query=workflow%3Aci) -[![codecov](https://codecov.io/gh/retailcrm/mg-transport-core/branch/master/graph/badge.svg)](https://codecov.io/gh/retailcrm/mg-transport-core) -[![pkg.go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/retailcrm/mg-transport-core/core) +[![Coverage](https://codecov.io/gh/retailcrm/mg-transport-core/branch/master/graph/badge.svg?logo=codecov&logoColor=white)](https://codecov.io/gh/retailcrm/mg-transport-core) +[![GitHub release](https://img.shields.io/github/release/retailcrm/mg-transport-core.svg?logo=github&logoColor=white)](https://github.com/retailcrm/mg-transport-core/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/retailcrm/mg-transport-core)](https://goreportcard.com/report/github.com/retailcrm/mg-transport-core) -[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/retailcrm/mg-transport-core/blob/master/LICENSE.md) +[![GoLang version](https://img.shields.io/badge/go->=1.12-blue.svg?logo=go&logoColor=white)](https://golang.org/dl/) +[![pkg.go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/retailcrm/mg-transport-core/core) + +This library provides different functions like error-reporting, logging, localization, etc. in order to make it easier to create transports. -This library provides different functions like error-reporting, logging, localization, etc. in order to make it easier to create transports. Usage: ```go package main @@ -61,7 +63,9 @@ func main() { ### Resource embedding [packr](https://github.com/gobuffalo/packr/tree/master/v2) can be used to provide resource embedding. In order to use packr you must follow [this instruction](https://github.com/gobuffalo/packr/tree/master/v2#library-installation), and provide boxes with templates, -translations and assets to library. Example: +translations and assets to library. + +Example: ```go package main diff --git a/core/utils.go b/core/utils.go index 4251217..aa2c04f 100644 --- a/core/utils.go +++ b/core/utils.go @@ -108,7 +108,7 @@ func (u *Utils) GenerateToken() string { return fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprintf("%d%d", time.Now().UnixNano(), c)))) } -// GetAPIClient will initialize retailCRM api client from url and key +// GetAPIClient will initialize RetailCRM api client from url and key func (u *Utils) GetAPIClient(url, key string) (*v5.Client, int, error) { client := v5.New(url, key) client.Debug = u.IsDebug diff --git a/core/utils_test.go b/core/utils_test.go index eb7155f..d53a629 100644 --- a/core/utils_test.go +++ b/core/utils_test.go @@ -17,7 +17,7 @@ import ( ) var ( - testCRMURL = "https://fake-uri.retailcrm.ru" + testCRMURL = "https://fake-uri.retailcrm.pro" testMGURL = "https://mg-url.example.com" )