From b8c5a87bc4d03cd79f26b5b29d02bd3f904c814c Mon Sep 17 00:00:00 2001
From: Philip <42116482+PhilipAbed@users.noreply.github.com>
Date: Thu, 21 Jul 2022 18:29:15 +0300
Subject: [PATCH] fix(manage/gomod): Golang fix pin (#16682)

* Add .whitesource configuration file (#3)

Co-authored-by: whitesource-for-github-com[bot] <50673670+whitesource-for-github-com[bot]@users.noreply.github.com>

* Update .whitesource

* build(deps): update dependency simple-git to v3.5.0 (#17)

Co-authored-by: whitesource-for-github-com[bot] <whitesource-for-github-com[bot]@users.noreply.github.com>

* golang fix pin

* golang fix pin

Co-authored-by: whitesource-for-github-com[bot] <50673670+whitesource-for-github-com[bot]@users.noreply.github.com>
Co-authored-by: whitesource-for-github-com[bot] <whitesource-for-github-com[bot]@users.noreply.github.com>
---
 lib/modules/manager/gomod/extract.spec.ts | 1 +
 lib/modules/manager/gomod/extract.ts      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/modules/manager/gomod/extract.spec.ts b/lib/modules/manager/gomod/extract.spec.ts
index 4a673a20fc..0ca53a8a73 100644
--- a/lib/modules/manager/gomod/extract.spec.ts
+++ b/lib/modules/manager/gomod/extract.spec.ts
@@ -27,6 +27,7 @@ describe('modules/manager/gomod/extract', () => {
             depType: 'golang',
             depName: 'go',
             datasource: 'golang-version',
+            rangeStrategy: 'replace',
           }),
         ])
       );
diff --git a/lib/modules/manager/gomod/extract.ts b/lib/modules/manager/gomod/extract.ts
index 55005b4b04..935f63e4c2 100644
--- a/lib/modules/manager/gomod/extract.ts
+++ b/lib/modules/manager/gomod/extract.ts
@@ -45,6 +45,7 @@ function getGoDep(lineNumber: number, goVer: string): PackageDependency {
     currentValue: goVer,
     datasource: GolangVersionDatasource.id,
     versioning: 'npm',
+    rangeStrategy: 'replace',
   };
 }
 
-- 
GitLab