From 01e639b8b0938dc56747124226f8b9256e304fcc Mon Sep 17 00:00:00 2001 From: Jeremy Edwards <1312331+jeremyje@users.noreply.github.com> Date: Tue, 25 Oct 2022 07:32:08 -0700 Subject: [PATCH] No file sync add timestamps --- go.mod | 2 +- go.sum | 4 ++-- internal/file.go | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index abd6f05..8e8c866 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/jeremyje/coretemp-exporter go 1.18 require ( - github.com/jeremyje/coretempsdk-go v0.5.0 + github.com/jeremyje/coretempsdk-go v0.6.0 github.com/prometheus/client_golang v1.13.0 go.opentelemetry.io/otel v1.11.0 go.opentelemetry.io/otel/exporters/prometheus v0.32.3 diff --git a/go.sum b/go.sum index 8608354..d7b8f1f 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,8 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jeremyje/coretempsdk-go v0.5.0 h1:BCpO0aFwQ/tvlhscusLAt5RJ6H9NHwXMxoYFrn3mNIs= -github.com/jeremyje/coretempsdk-go v0.5.0/go.mod h1:VwgOwXdg3aFQB6ml0+fJ04LRaCD8SgmTC20TDVfKl9s= +github.com/jeremyje/coretempsdk-go v0.6.0 h1:SyDeu8j+NvcYfFSHsQROddW1C0i421FOmcNddbX/roY= +github.com/jeremyje/coretempsdk-go v0.6.0/go.mod h1:VwgOwXdg3aFQB6ml0+fJ04LRaCD8SgmTC20TDVfKl9s= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= diff --git a/internal/file.go b/internal/file.go index 9581b6a..ed76783 100644 --- a/internal/file.go +++ b/internal/file.go @@ -50,8 +50,5 @@ func (s *fileSink) Observe(ctx context.Context, info *coretempsdk.CoreTempInfo) if _, err := s.fp.Write(newlineAsByte); err != nil { log.Printf("ERROR: %s", err) } - if err := s.fp.Sync(); err != nil { - log.Printf("ERROR: %s", err) - } } }