diff --git a/dist/setup/index.js b/dist/setup/index.js
index 7b3f5dc..08d77d5 100644
--- a/dist/setup/index.js
+++ b/dist/setup/index.js
@@ -63150,7 +63150,9 @@ function run() {
             const cache = core.getBooleanInput('cache');
             core.info(`Setup go version spec ${versionSpec}`);
             let arch = core.getInput('architecture');
-            arch = arch ? arch : os_1.default.arch();
+            if (!arch) {
+                arch = os_1.default.arch();
+            }
             if (versionSpec) {
                 let token = core.getInput('token');
                 let auth = !token || cache_utils_1.isGhes() ? undefined : `token ${token}`;
diff --git a/src/main.ts b/src/main.ts
index e4062df..8648d4d 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -21,7 +21,10 @@ export async function run() {
     core.info(`Setup go version spec ${versionSpec}`);
 
     let arch = core.getInput('architecture');
-    arch = arch ? arch : os.arch();
+
+    if (!arch) {
+      arch = os.arch();
+    }
 
     if (versionSpec) {
       let token = core.getInput('token');