From c513ad4524a8a0cff5a58cb49ee8440e5bb656c5 Mon Sep 17 00:00:00 2001 From: Taehyun Kwon Date: Fri, 9 Oct 2020 13:14:15 -0700 Subject: [PATCH 01/13] Switch to gofrs/uuid (#52) * Switch to gofrs/uuid from satori/go.uuid as this repo is no longer maintained * Switch from using the uuid contract to the standard generator, call the fallback, SetVersion, and SetVariant in case of err * factor the u.Set* into fallback function Co-authored-by: Taehyun Kwon --- appinsights/uuid.go | 15 ++++++++------- go.mod | 2 +- go.sum | 3 +++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/appinsights/uuid.go b/appinsights/uuid.go index 6e433ce..08c6786 100644 --- a/appinsights/uuid.go +++ b/appinsights/uuid.go @@ -8,10 +8,10 @@ import ( "sync" "time" - "github.com/satori/go.uuid" + "github.com/gofrs/uuid" ) -// uuidGenerator is a wrapper for satori/go.uuid, used for a few reasons: +// uuidGenerator is a wrapper for gofrs/uuid, an active fork of satori/go.uuid used for a few reasons: // - Avoids build failures due to version differences when a project imports us but // does not respect our vendoring. (satori/go.uuid#77, #71, #66, ...) // - Avoids error output when creaing new UUID's: if the crypto reader fails, @@ -46,13 +46,13 @@ func newUuidGenerator(reader io.Reader) *uuidGenerator { // newUUID generates a new V4 UUID func (gen *uuidGenerator) newUUID() uuid.UUID { - u := uuid.UUID{} - if _, err := io.ReadFull(gen.reader, u[:]); err != nil { + //call the standard generator + u, err := uuid.NewV4() + //err will be either EOF or unexpected EOF + if err != nil { gen.fallback(&u) } - u.SetVersion(uuid.V4) - u.SetVersion(uuid.VariantRFC4122) return u } @@ -60,9 +60,10 @@ func (gen *uuidGenerator) newUUID() uuid.UUID { func (gen *uuidGenerator) fallback(u *uuid.UUID) { gen.Lock() defer gen.Unlock() - // This does not fail as per documentation gen.fallbackRand.Read(u[:]) + u.SetVersion(uuid.V4) + u.SetVariant(uuid.VariantRFC4122) } // newUUID generates a new V4 UUID diff --git a/go.mod b/go.mod index a5de8c4..5a9d4d0 100644 --- a/go.mod +++ b/go.mod @@ -4,10 +4,10 @@ go 1.12 require ( code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c + github.com/gofrs/uuid v3.3.0+incompatible github.com/kr/pretty v0.1.0 // indirect github.com/onsi/ginkgo v1.8.0 // indirect github.com/onsi/gomega v1.5.0 // indirect - github.com/satori/go.uuid v1.2.0 github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect ) diff --git a/go.sum b/go.sum index f388a46..4cb890a 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,9 @@ code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c h1:5eeuG0BHx1+DHe code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/gofrs/uuid v1.2.0 h1:coDhrjgyJaglxSjxuJdqQSSdUpG3w6p1OwN2od6frBU= +github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= From c063db145320a271b46e51eef7bceb88176b82c1 Mon Sep 17 00:00:00 2001 From: JJ Jordan Date: Fri, 29 Jan 2021 16:20:35 -0800 Subject: [PATCH 02/13] Version 0.4.4 (#54) * Update go versions * go mod tidy * Rev to 0.4.4 --- .travis.yml | 2 +- appinsights/package.go | 2 +- go.sum | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1245e41..26a6309 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: go go: - - 1.12.x - 1.13.x - 1.14.x + - 1.15.x sudo: false diff --git a/appinsights/package.go b/appinsights/package.go index 41cb4a1..8944a51 100644 --- a/appinsights/package.go +++ b/appinsights/package.go @@ -4,5 +4,5 @@ package appinsights const ( sdkName = "go" - Version = "0.4.3" + Version = "0.4.4" ) diff --git a/go.sum b/go.sum index 4cb890a..cfc61ec 100644 --- a/go.sum +++ b/go.sum @@ -2,7 +2,6 @@ code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c h1:5eeuG0BHx1+DHe code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gofrs/uuid v1.2.0 h1:coDhrjgyJaglxSjxuJdqQSSdUpG3w6p1OwN2od6frBU= github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= @@ -19,8 +18,6 @@ github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc h1:LUUe4cdABGrIJAhl1P1ZpWY76AwukVszFdwkVFVLwIk= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= From b13a0f9b864a5bc54376980702557f7a25785cdd Mon Sep 17 00:00:00 2001 From: Matt McCleary <43887470+mattmccleary@users.noreply.github.com> Date: Mon, 8 Nov 2021 14:49:20 -0800 Subject: [PATCH 03/13] Update README.md (#39) * Update README.md * Update README.md Co-authored-by: Matt <43887470+DawgFan@users.noreply.github.com> --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5f2ae10..2427f1c 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,9 @@ telemetry of various kinds (event, metric, trace) to the Application Insights service where they can be visualized in the Azure Portal. ## Status -This SDK is NOT maintained or supported by Microsoft even though we've contributed to it in the past. Note that Azure Monitor only provides support when using our [supported SDKs](https://docs.microsoft.com/en-us/azure/azure-monitor/app/platforms#unsupported-community-sdks), and this SDK does not yet meet that standard. Known gaps include: +This SDK is NOT currently maintained or supported by Microsoft. Azure Monitor only provides support when using our [supported SDKs](https://docs.microsoft.com/en-us/azure/azure-monitor/app/platforms#unsupported-community-sdks), and this SDK does not yet meet that standard. +Known gaps include: * Operation correlation is not supported, but this can be managed by the caller through the interfaces that exist today. * Sampling is not supported. The more mature SDKs support dynamic sampling, @@ -22,7 +23,7 @@ This SDK is NOT maintained or supported by Microsoft even though we've contribut spilling events to disk in case of network interruption. This SDK has no such feature. -We’re constantly assessing opportunities to expand our support for other languages, so follow our [GitHub Announcements](https://github.com/microsoft/ApplicationInsights-Announcements/issues) page to receive the latest SDK news. +We’re constantly assessing opportunities to expand our support for other languages, so follow our [Azure Updates](https://azure.microsoft.com/updates/?query=application%20insights) page to receive the latest SDK news. ## Requirements **Install** From 74a6a245ab94f305e9f08f871cb299151d0ccb56 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 11:43:51 -0500 Subject: [PATCH 04/13] Adecuaciones para que funcione desde este fork y update de las deps --- README.md | 72 +++++++++++++++++---------------- appinsights/telemetrychannel.go | 3 +- go.mod | 14 +++---- go.sum | 14 +++---- 4 files changed, 50 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index 2427f1c..589e77b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Microsoft Application Insights SDK for Go +# Application Insights SDK for Go + -[![Build Status](https://travis-ci.org/Microsoft/ApplicationInsights-Go.svg?branch=master)](https://travis-ci.org/Microsoft/ApplicationInsights-Go) [![Documentation](https://godoc.org/github.com/microsoft/ApplicationInsights-Go?status.svg)](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights) [![Release](https://img.shields.io/github/release/Microsoft/ApplicationInsights-Go/all.svg)](https://github.com/microsoft/ApplicationInsights-Go/releases) This project provides a Go SDK for Application Insights. [Application Insights](http://azure.microsoft.com/en-us/services/application-insights/) @@ -10,25 +10,27 @@ telemetry of various kinds (event, metric, trace) to the Application Insights service where they can be visualized in the Azure Portal. ## Status -This SDK is NOT currently maintained or supported by Microsoft. Azure Monitor only provides support when using our [supported SDKs](https://docs.microsoft.com/en-us/azure/azure-monitor/app/platforms#unsupported-community-sdks), and this SDK does not yet meet that standard. -Known gaps include: -* Operation correlation is not supported, but this can be managed by the - caller through the interfaces that exist today. -* Sampling is not supported. The more mature SDKs support dynamic sampling, - but at present this does not even support manual sampling. -* Automatic collection of events is not supported. All telemetry must be - explicitly collected and sent by the user. -* Offline storage of telemetry is not supported. The .Net SDK is capable of - spilling events to disk in case of network interruption. This SDK has no - such feature. +This is a fork from the original [Microsoft project](https://github.com/javestmx/geecommon). + +This SDK is NOT currently maintained or supported by Microsoft. Azure Monitor only provides support when using our [supported SDKs](https://docs.microsoft.com/en-us/azure/azure-monitor/app/platforms#unsupported-community-sdks). + + +## Contrubuting + +Please feel free to fork this project and submit any pull requests. + +Submitting pull requests will solve issues faster than just reporting them. Taking +acctions is always usefull than cry and wait for someone else solution. + +## Dislclaimer -We’re constantly assessing opportunities to expand our support for other languages, so follow our [Azure Updates](https://azure.microsoft.com/updates/?query=application%20insights) page to receive the latest SDK news. +JAVEST or any developer who contributes to this repo are not responsible for any damages or losses caused by using this SDK. Use at your own risk. ## Requirements **Install** ``` -go get github.com/microsoft/ApplicationInsights-Go/appinsights +go get github.com/javestmx/ApplicationInsights-Go ``` **Get an instrumentation key** >**Note**: an instrumentation key is required before any data can be sent. Please see the "[Getting an Application Insights Instrumentation Key](https://github.com/microsoft/AppInsights-Home/wiki#getting-an-application-insights-instrumentation-key)" section of the wiki for more information. To try the SDK without an instrumentation key, set the instrumentationKey config value to a non-empty string. @@ -38,10 +40,10 @@ go get github.com/microsoft/ApplicationInsights-Go/appinsights ## Setup To start tracking telemetry, you'll want to first initialize a -[telemetry client](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#TelemetryClient). +[telemetry client](https://godoc.org/github.com/javestmx/geecommon/appinsights#TelemetryClient). ```go -import "github.com/microsoft/ApplicationInsights-Go/appinsights" +import "github.com/javestmx/ApplicationInsights-Go" func main() { client := appinsights.NewTelemetryClient("") @@ -49,12 +51,12 @@ func main() { ``` If you want more control over the client's behavior, you should initialize a -new [TelemetryConfiguration](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#TelemetryConfiguration) +new [TelemetryConfiguration](https://godoc.org/github.com/javestmx/geecommon/appinsights#TelemetryConfiguration) object and use it to create a client: ```go import "time" -import "github.com/microsoft/ApplicationInsights-Go/appinsights" +import "github.com/javestmx/ApplicationInsights-Go" func main() { telemetryConfig := appinsights.NewTelemetryConfiguration("") @@ -77,7 +79,7 @@ it in your data model. ## Telemetry submission -The [TelemetryClient](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#TelemetryClient) +The [TelemetryClient](https://godoc.org/github.com/javestmx/geecommon/appinsights#TelemetryClient) itself has several methods for submitting telemetry: ```go @@ -129,7 +131,7 @@ then be submitted through the `TelemetryClient.Track` method, as illustrated in the below sections: ### Trace -[Trace telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#TraceTelemetry) +[Trace telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#TraceTelemetry) represent printf-like trace statements that can be text searched. They have an associated severity level, values for which are found in the package's constants: @@ -161,7 +163,7 @@ client.Track(trace) ``` ### Events -[Event telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#EventTelemetry) +[Event telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#EventTelemetry) represent structured event records. ```go @@ -171,7 +173,7 @@ client.Track(event) ``` ### Single-value metrics -[Metric telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#MetricTelemetry) +[Metric telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#MetricTelemetry) each represent a single data point. ```go @@ -183,7 +185,7 @@ client.Track(metric) ### Pre-aggregated metrics To reduce the number of metric values that may be sent through telemetry, when using a particularly high volume of measurements, metric data can be -[pre-aggregated by the client](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#AggregateMetricTelemetry) +[pre-aggregated by the client](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#AggregateMetricTelemetry) and submitted all at once. ```go @@ -216,7 +218,7 @@ client.Track(aggregate) ``` ### Requests -[Request telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#RequestTelemetry) +[Request telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#RequestTelemetry) represent completion of an external request to the application and contains a summary of that request execution and results. This SDK's request telemetry is focused on HTTP requests. @@ -251,7 +253,7 @@ client.Track(request) ``` ### Dependencies -[Remote dependency telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#RemoteDependencyTelemetry) +[Remote dependency telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#RemoteDependencyTelemetry) represent interactions of the monitored component with a remote component/service like SQL or an HTTP endpoint. @@ -282,7 +284,7 @@ client.Track(dependency) ``` ### Exceptions -[Exception telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#ExceptionTelemetry) +[Exception telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#ExceptionTelemetry) represent handled or unhandled exceptions that occurred during the execution of the monitored application. This SDK is geared towards handling panics or unexpected results from important functions: @@ -354,7 +356,7 @@ if err != nil { ``` ### Availability -[Availability telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights/#AvailabilityTelemetry) +[Availability telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights/#AvailabilityTelemetry) represent the result of executing an availability test. This is useful if you are writing availability monitors in Go. @@ -379,7 +381,7 @@ client.Track(availability) ``` ### Page Views -[Page view telemetry items](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights/#PageViewTelemetry) +[Page view telemetry items](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights/#PageViewTelemetry) represent generic actions on a page like a button click. These are typically generated by the client side rather than the server side, but is available here nonetheless. @@ -400,10 +402,10 @@ client.Track(pageview) Telemetry items all have a `Tags` property that contains information *about* the submitted telemetry, such as user, session, and device information. The `Tags` property is an instance of the -[contracts.ContextTags](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights/contracts/#ContextTags) +[contracts.ContextTags](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights/contracts/#ContextTags) type, which is a `map[string]string` under the hood, but has helper methods to access the most commonly used data. An instance of -[TelemetryContext](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights/#TelemetryContext) +[TelemetryContext](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights/#TelemetryContext) exists on the `TelemetryClient`, and also contains a `Tags` property. These tags are applied to all telemetry sent through the client. If a context tag is found on both the client's `TelemetryContext` and in the telemetry item's @@ -415,8 +417,8 @@ A few examples for illustration: import ( "os" - "github.com/microsoft/ApplicationInsights-Go/appinsights" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) func main() { @@ -462,7 +464,7 @@ func main() { ``` ### Shutdown -The Go SDK submits data asynchronously. The [InMemoryChannel](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights/#InMemoryChannel) +The Go SDK submits data asynchronously. The [InMemoryChannel](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights/#InMemoryChannel) launches its own goroutine used to accept and send telemetry. If you're not careful, this may result in lost telemetry when the service needs to shut down. The channel has a few methods to deal with this case: @@ -510,7 +512,7 @@ func main() { We recommend something similar to the above to minimize lost telemetry through shutdown. -[The documentation](https://godoc.org/github.com/microsoft/ApplicationInsights-Go/appinsights#TelemetryChannel) +[The documentation](https://godoc.org/github.com/javestmx/ApplicationInsights-Go/appinsights#TelemetryChannel) explains in more detail what can lead to the cases above. ### Diagnostics diff --git a/appinsights/telemetrychannel.go b/appinsights/telemetrychannel.go index c539d4e..189b3ca 100644 --- a/appinsights/telemetrychannel.go +++ b/appinsights/telemetrychannel.go @@ -1,8 +1,9 @@ package appinsights import ( - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" "time" + + "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" ) // Implementations of TelemetryChannel are responsible for queueing and diff --git a/go.mod b/go.mod index 5a9d4d0..2d789ad 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,9 @@ -module github.com/microsoft/ApplicationInsights-Go +module github.com/javestmx/ApplicationInsights-Go -go 1.12 +go 1.18 require ( - code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c - github.com/gofrs/uuid v3.3.0+incompatible - github.com/kr/pretty v0.1.0 // indirect - github.com/onsi/ginkgo v1.8.0 // indirect - github.com/onsi/gomega v1.5.0 // indirect - github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc // indirect - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + code.cloudfoundry.org/clock v1.0.0 + github.com/gofrs/uuid v4.2.0+incompatible + github.com/microsoft/ApplicationInsights-Go v0.4.4 ) diff --git a/go.sum b/go.sum index cfc61ec..92fef96 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,18 @@ -code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c h1:5eeuG0BHx1+DHeT3AP+ISKZ2ht1UjGhm581ljqYpVeQ= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +code.cloudfoundry.org/clock v1.0.0 h1:kFXWQM4bxYvdBw2X8BbBeXwQNgfoWv1vqAk2ZZyBN2o= +code.cloudfoundry.org/clock v1.0.0/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/microsoft/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= +github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -22,14 +22,12 @@ github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc h1:LUUe4cdABGrIJAhl1P github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= From 3059a8c39c667d24dd39bb4770111b44940a482d Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 11:46:45 -0500 Subject: [PATCH 05/13] replace old repo --- appinsights/client.go | 2 +- appinsights/constants.go | 2 +- appinsights/exception.go | 2 +- appinsights/exception_test.go | 2 +- appinsights/inmemorychannel.go | 2 +- appinsights/jsonserializer.go | 2 +- appinsights/telemetry.go | 2 +- appinsights/telemetry_test.go | 2 +- appinsights/telemetrychannel.go | 2 +- appinsights/telemetrycontext.go | 2 +- appinsights/telemetrycontext_test.go | 2 +- appinsights/transmitter_test.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/appinsights/client.go b/appinsights/client.go index d532e03..6b40593 100644 --- a/appinsights/client.go +++ b/appinsights/client.go @@ -3,7 +3,7 @@ package appinsights import ( "time" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) // Application Insights telemetry client provides interface to track telemetry diff --git a/appinsights/constants.go b/appinsights/constants.go index 060ed59..75c4dd7 100644 --- a/appinsights/constants.go +++ b/appinsights/constants.go @@ -2,7 +2,7 @@ package appinsights // NOTE: This file was automatically generated. -import "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" +import "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" // Type of the metric data measurement. const ( diff --git a/appinsights/exception.go b/appinsights/exception.go index c440797..b2cdc36 100644 --- a/appinsights/exception.go +++ b/appinsights/exception.go @@ -6,7 +6,7 @@ import ( "runtime" "strings" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) // Exception telemetry items represent a handled or unhandled exceptions that diff --git a/appinsights/exception_test.go b/appinsights/exception_test.go index c42b91d..5142e56 100644 --- a/appinsights/exception_test.go +++ b/appinsights/exception_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) type myStringer struct{} diff --git a/appinsights/inmemorychannel.go b/appinsights/inmemorychannel.go index 4296e4c..29e9d56 100644 --- a/appinsights/inmemorychannel.go +++ b/appinsights/inmemorychannel.go @@ -5,7 +5,7 @@ import ( "time" "code.cloudfoundry.org/clock" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) var ( diff --git a/appinsights/jsonserializer.go b/appinsights/jsonserializer.go index 4706cd7..4bfe682 100644 --- a/appinsights/jsonserializer.go +++ b/appinsights/jsonserializer.go @@ -4,7 +4,7 @@ import ( "bytes" "encoding/json" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) type telemetryBufferItems []*contracts.Envelope diff --git a/appinsights/telemetry.go b/appinsights/telemetry.go index 54b8878..6956802 100644 --- a/appinsights/telemetry.go +++ b/appinsights/telemetry.go @@ -7,7 +7,7 @@ import ( "strconv" "time" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) // Common interface implemented by telemetry data contracts diff --git a/appinsights/telemetry_test.go b/appinsights/telemetry_test.go index ba66508..7481f86 100644 --- a/appinsights/telemetry_test.go +++ b/appinsights/telemetry_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) const float_precision = 1e-4 diff --git a/appinsights/telemetrychannel.go b/appinsights/telemetrychannel.go index 189b3ca..7f99535 100644 --- a/appinsights/telemetrychannel.go +++ b/appinsights/telemetrychannel.go @@ -3,7 +3,7 @@ package appinsights import ( "time" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) // Implementations of TelemetryChannel are responsible for queueing and diff --git a/appinsights/telemetrycontext.go b/appinsights/telemetrycontext.go index f54e36d..8e70b5d 100644 --- a/appinsights/telemetrycontext.go +++ b/appinsights/telemetrycontext.go @@ -3,7 +3,7 @@ package appinsights import ( "strings" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) // Encapsulates contextual data common to all telemetry submitted through a diff --git a/appinsights/telemetrycontext_test.go b/appinsights/telemetrycontext_test.go index ada1a2e..54f1d51 100644 --- a/appinsights/telemetrycontext_test.go +++ b/appinsights/telemetrycontext_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) func TestDefaultTags(t *testing.T) { diff --git a/appinsights/transmitter_test.go b/appinsights/transmitter_test.go index 7fe3df5..dcc662e 100644 --- a/appinsights/transmitter_test.go +++ b/appinsights/transmitter_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" + "github.com/javestmx/ApplicationInsights-Go/appinsights/contracts" ) type testServer struct { diff --git a/go.mod b/go.mod index 2d789ad..7e8e7c1 100644 --- a/go.mod +++ b/go.mod @@ -5,5 +5,5 @@ go 1.18 require ( code.cloudfoundry.org/clock v1.0.0 github.com/gofrs/uuid v4.2.0+incompatible - github.com/microsoft/ApplicationInsights-Go v0.4.4 + github.com/javestmx/ApplicationInsights-Go v0.4.4 ) diff --git a/go.sum b/go.sum index 92fef96..3ef44fe 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/microsoft/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= -github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= +github.com/javestmx/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= +github.com/javestmx/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= From aee1b9d320acdd4115b940261c2b878535de66e4 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 12:06:11 -0500 Subject: [PATCH 06/13] go mod tidy --- go.mod | 7 ++++- go.sum | 90 ++++++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 75 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 7e8e7c1..5e54eb8 100644 --- a/go.mod +++ b/go.mod @@ -5,5 +5,10 @@ go 1.18 require ( code.cloudfoundry.org/clock v1.0.0 github.com/gofrs/uuid v4.2.0+incompatible - github.com/javestmx/ApplicationInsights-Go v0.4.4 +) + +require ( + github.com/onsi/ginkgo v1.16.5 // indirect + github.com/onsi/gomega v1.19.0 // indirect + github.com/tedsuo/ifrit v0.0.0-20220120221754-dd274de71113 // indirect ) diff --git a/go.sum b/go.sum index 3ef44fe..5ef7b32 100644 --- a/go.sum +++ b/go.sum @@ -1,37 +1,85 @@ -code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= code.cloudfoundry.org/clock v1.0.0 h1:kFXWQM4bxYvdBw2X8BbBeXwQNgfoWv1vqAk2ZZyBN2o= code.cloudfoundry.org/clock v1.0.0/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/javestmx/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= -github.com/javestmx/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc h1:LUUe4cdABGrIJAhl1P1ZpWY76AwukVszFdwkVFVLwIk= -github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/tedsuo/ifrit v0.0.0-20220120221754-dd274de71113 h1:PnxSSxsUvOqMh7nslHscii/GV/Y9ZflmkZ2oEEEIGj4= +github.com/tedsuo/ifrit v0.0.0-20220120221754-dd274de71113/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= From 3d806c2c3cb6a3152be30dd09446ad81addf9cd7 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 12:38:55 -0500 Subject: [PATCH 07/13] =?UTF-8?q?se=20pas=C3=B3=20un=20linter=20y=20se=20e?= =?UTF-8?q?liminaron=20los=20errores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appinsights/client_test.go | 4 ++-- appinsights/inmemorychannel_test.go | 8 +++---- appinsights/telemetry_test.go | 24 +++++++++---------- appinsights/telemetrycontext_test.go | 2 +- appinsights/transmitter.go | 4 ++-- appinsights/transmitter_test.go | 36 +++++++++++++++------------- 6 files changed, 40 insertions(+), 38 deletions(-) diff --git a/appinsights/client_test.go b/appinsights/client_test.go index 05e064f..0f1abf5 100644 --- a/appinsights/client_test.go +++ b/appinsights/client_test.go @@ -3,7 +3,7 @@ package appinsights import ( "bytes" "compress/gzip" - "io/ioutil" + "io" "testing" "time" ) @@ -93,7 +93,7 @@ func TestEndToEnd(t *testing.T) { } // Read payload - body, err := ioutil.ReadAll(reader) + body, err := io.ReadAll(reader) reader.Close() if err != nil { t.Fatalf("Couldn't read compressed data: %s", err.Error()) diff --git a/appinsights/inmemorychannel_test.go b/appinsights/inmemorychannel_test.go index e02e11c..8dd758c 100644 --- a/appinsights/inmemorychannel_test.go +++ b/appinsights/inmemorychannel_test.go @@ -404,10 +404,10 @@ func TestPartialRetry(t *testing.T) { ItemsAccepted: 2, ItemsReceived: 5, Errors: []*itemTransmissionResult{ - &itemTransmissionResult{Index: 1, StatusCode: 500, Message: "Server Error"}, - &itemTransmissionResult{Index: 2, StatusCode: 200, Message: "OK"}, - &itemTransmissionResult{Index: 3, StatusCode: 400, Message: "Bad Request"}, - &itemTransmissionResult{Index: 4, StatusCode: 408, Message: "Plz Retry"}, + {Index: 1, StatusCode: 500, Message: "Server Error"}, + {Index: 2, StatusCode: 200, Message: "OK"}, + {Index: 3, StatusCode: 400, Message: "Bad Request"}, + {Index: 4, StatusCode: 408, Message: "Plz Retry"}, }, }, } diff --git a/appinsights/telemetry_test.go b/appinsights/telemetry_test.go index 7481f86..73b1550 100644 --- a/appinsights/telemetry_test.go +++ b/appinsights/telemetry_test.go @@ -140,12 +140,12 @@ type statsTest struct { func TestAggregateMetricTelemetry(t *testing.T) { statsTests := []statsTest{ - statsTest{[]float64{}, 0.0, 0.0, 0.0, 0.0}, - statsTest{[]float64{0.0}, 0.0, 0.0, 0.0, 0.0}, - statsTest{[]float64{50.0}, 0.0, 0.0, 50.0, 50.0}, - statsTest{[]float64{50.0, 50.0}, 0.0, 0.0, 50.0, 50.0}, - statsTest{[]float64{50.0, 60.0}, 5.0, 7.071, 50.0, 60.0}, - statsTest{[]float64{9.0, 10.0, 11.0, 7.0, 13.0}, 2.0, 2.236, 7.0, 13.0}, + {[]float64{}, 0.0, 0.0, 0.0, 0.0}, + {[]float64{0.0}, 0.0, 0.0, 0.0, 0.0}, + {[]float64{50.0}, 0.0, 0.0, 50.0, 50.0}, + {[]float64{50.0, 50.0}, 0.0, 0.0, 50.0, 50.0}, + {[]float64{50.0, 60.0}, 5.0, 7.071, 50.0, 60.0}, + {[]float64{9.0, 10.0, 11.0, 7.0, 13.0}, 2.0, 2.236, 7.0, 13.0}, // TODO: More tests. } @@ -351,12 +351,12 @@ type durationTest struct { func TestFormatDuration(t *testing.T) { durationTests := []durationTest{ - durationTest{time.Hour, "0.01:00:00.0000000"}, - durationTest{time.Minute, "0.00:01:00.0000000"}, - durationTest{time.Second, "0.00:00:01.0000000"}, - durationTest{time.Millisecond, "0.00:00:00.0010000"}, - durationTest{100 * time.Nanosecond, "0.00:00:00.0000001"}, - durationTest{(31 * time.Hour) + (25 * time.Minute) + (30 * time.Second) + time.Millisecond, "1.07:25:30.0010000"}, + {time.Hour, "0.01:00:00.0000000"}, + {time.Minute, "0.00:01:00.0000000"}, + {time.Second, "0.00:00:01.0000000"}, + {time.Millisecond, "0.00:00:00.0010000"}, + {100 * time.Nanosecond, "0.00:00:00.0000001"}, + {(31 * time.Hour) + (25 * time.Minute) + (30 * time.Second) + time.Millisecond, "1.07:25:30.0010000"}, } for _, tst := range durationTests { diff --git a/appinsights/telemetrycontext_test.go b/appinsights/telemetrycontext_test.go index 54f1d51..4b98eb0 100644 --- a/appinsights/telemetrycontext_test.go +++ b/appinsights/telemetrycontext_test.go @@ -93,7 +93,7 @@ func TestSanitize(t *testing.T) { // Set up listener for the warnings. NewDiagnosticsMessageListener(func(msg string) error { - for k, _ := range found { + for k := range found { if strings.Contains(msg, k) { found[k] = found[k] + 1 break diff --git a/appinsights/transmitter.go b/appinsights/transmitter.go index 33a8be0..4bf6aac 100644 --- a/appinsights/transmitter.go +++ b/appinsights/transmitter.go @@ -4,7 +4,7 @@ import ( "bytes" "compress/gzip" "encoding/json" - "io/ioutil" + "io" "net/http" "sort" "time" @@ -90,7 +90,7 @@ func (transmitter *httpTransmitter) Transmit(payload []byte, items telemetryBuff defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { diagnosticsWriter.Printf("Failed to read response from server: %s", err.Error()) return nil, err diff --git a/appinsights/transmitter_test.go b/appinsights/transmitter_test.go index dcc662e..f1bf1f0 100644 --- a/appinsights/transmitter_test.go +++ b/appinsights/transmitter_test.go @@ -4,7 +4,7 @@ import ( "bytes" "compress/gzip" "fmt" - "io/ioutil" + "io" "net/http" "net/http/httptest" "strings" @@ -34,7 +34,7 @@ func (server *testServer) Close() { } func (server *testServer) ServeHTTP(writer http.ResponseWriter, req *http.Request) { - body, _ := ioutil.ReadAll(req.Body) + body, _ := io.ReadAll(req.Body) hdr := writer.Header() for k, v := range server.responseHeaders { @@ -42,7 +42,9 @@ func (server *testServer) ServeHTTP(writer http.ResponseWriter, req *http.Reques } writer.WriteHeader(server.responseCode) - writer.Write(server.responseData) + if _, err := writer.Write(server.responseData); err != nil { + panic(err) + } server.notify <- &testRequest{ request: req, @@ -139,7 +141,7 @@ func doBasicTransmit(client transmitter, server *testServer, t *testing.T) { t.Fatalf("Couldn't create gzip reader: %s", err.Error()) } - body, err := ioutil.ReadAll(reader) + body, err := io.ReadAll(reader) reader.Close() if err != nil { t.Fatalf("Couldn't read compressed data: %s", err.Error()) @@ -387,8 +389,8 @@ func TestTransmitResults(t *testing.T) { ItemsAccepted: 3, ItemsReceived: 5, Errors: []*itemTransmissionResult{ - &itemTransmissionResult{Index: 2, StatusCode: 400, Message: "Bad 1"}, - &itemTransmissionResult{Index: 4, StatusCode: 400, Message: "Bad 2"}, + {Index: 2, StatusCode: 400, Message: "Bad 1"}, + {Index: 4, StatusCode: 400, Message: "Bad 2"}, }, } @@ -396,8 +398,8 @@ func TestTransmitResults(t *testing.T) { ItemsAccepted: 2, ItemsReceived: 4, Errors: []*itemTransmissionResult{ - &itemTransmissionResult{Index: 2, StatusCode: 400, Message: "Bad 1"}, - &itemTransmissionResult{Index: 4, StatusCode: 408, Message: "OK Later"}, + {Index: 2, StatusCode: 400, Message: "Bad 1"}, + {Index: 4, StatusCode: 408, Message: "OK Later"}, }, } @@ -405,11 +407,11 @@ func TestTransmitResults(t *testing.T) { ItemsAccepted: 0, ItemsReceived: 5, Errors: []*itemTransmissionResult{ - &itemTransmissionResult{Index: 0, StatusCode: 500, Message: "Bad 1"}, - &itemTransmissionResult{Index: 1, StatusCode: 500, Message: "Bad 2"}, - &itemTransmissionResult{Index: 2, StatusCode: 500, Message: "Bad 3"}, - &itemTransmissionResult{Index: 3, StatusCode: 500, Message: "Bad 4"}, - &itemTransmissionResult{Index: 4, StatusCode: 500, Message: "Bad 5"}, + {Index: 0, StatusCode: 500, Message: "Bad 1"}, + {Index: 1, StatusCode: 500, Message: "Bad 2"}, + {Index: 2, StatusCode: 500, Message: "Bad 3"}, + {Index: 3, StatusCode: 500, Message: "Bad 4"}, + {Index: 4, StatusCode: 500, Message: "Bad 5"}, }, } @@ -481,10 +483,10 @@ func TestGetRetryItems(t *testing.T) { ItemsReceived: 7, ItemsAccepted: 4, Errors: []*itemTransmissionResult{ - &itemTransmissionResult{Index: 1, StatusCode: 200, Message: "OK"}, - &itemTransmissionResult{Index: 3, StatusCode: 400, Message: "Bad"}, - &itemTransmissionResult{Index: 5, StatusCode: 408, Message: "Later"}, - &itemTransmissionResult{Index: 6, StatusCode: 500, Message: "Oops"}, + {Index: 1, StatusCode: 200, Message: "OK"}, + {Index: 3, StatusCode: 400, Message: "Bad"}, + {Index: 5, StatusCode: 408, Message: "Later"}, + {Index: 6, StatusCode: 500, Message: "Oops"}, }, }, } From bc44792e49ba084ab9099dad4a70b949f06c9b55 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 12:47:58 -0500 Subject: [PATCH 08/13] agregamos el linter --- .github/workflows/go.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..8a6211d --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,52 @@ +name: Go-Linter + +on: + pull_request: + branches: + - main + - development +permissions: + contents: read + pull-requests: read +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version + version: latest + + # Optional: working directory, useful for monorepos + # working-directory: somedir + + # Optional: golangci-lint command line arguments. + # args: --issues-exit-code=0 + + # Optional: show only new issues if it's a pull request. The default value is `false`. + # only-new-issues: true + + # Optional: if set to true then the action will use pre-installed Go. + # skip-go-installation: true + + # Optional: if set to true then the action don't cache or restore ~/go/pkg. + # skip-pkg-cache: true + + # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. + # skip-build-cache: true + + Unit-testing: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run tests + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Test script + run: ./test.sh + From b93264b06b829c85310417163aec311078ca918f Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 12:52:57 -0500 Subject: [PATCH 09/13] agregamos el linter --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8a6211d..5efcc2f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -4,7 +4,7 @@ on: pull_request: branches: - main - - development + - develop permissions: contents: read pull-requests: read From 3f4e6990362361993ef027727441ab51f59f078d Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 12:56:08 -0500 Subject: [PATCH 10/13] add testing --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5efcc2f..0048825 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -45,8 +45,8 @@ jobs: - name: Run tests uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.18 - name: Test script - run: ./test.sh + run: go test ./... From 484103df32777531c8f43aadcabfa544d1ac4a48 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 13:04:49 -0500 Subject: [PATCH 11/13] add verbose mode --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0048825..3220a7f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,7 +24,7 @@ jobs: # working-directory: somedir # Optional: golangci-lint command line arguments. - # args: --issues-exit-code=0 + args: --verbose # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true From e8f0381678564d14ed5a09061f6c3f7f9dcc2699 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 15:10:59 -0500 Subject: [PATCH 12/13] add config file del linter --- .golangci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..d5e9b8a --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,9 @@ +# Configuraciones para el linter de Golang-ci +run: + go: '1.18' + # Desactivando linters para Go-18 + disable: + - gosimple + - staticcheck + - structcheck + - unused \ No newline at end of file From 7571eba94b1fe567ce02f34f0bd5dd3e8565b1b4 Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 26 May 2022 15:21:34 -0500 Subject: [PATCH 13/13] disable unsupported linters --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index d5e9b8a..10de0e8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,6 +2,7 @@ run: go: '1.18' # Desactivando linters para Go-18 +linters: disable: - gosimple - staticcheck