package.json: use golang.go in the main dev branch

Since we are now maintaining golang.go and that is our main extension,
using the id makes more sense. That will help existing Go users who want
to make and test a small change quickly.

- Rename src/telemetry.ts to src/const.ts because there is no
telemetry related code in the file.
- Move docs/nightly back to build/nightly, because they are meant to be
used during the nightly release process, rather than to serve as
documentation for end users.

In the nightly release, we replace the extension id with golang.go-nightly,
combine README.md with build/nightly/README.md, and replace src/const.ts
with build/nightly/const.ts.

Change-Id: I08e452dea4319d38f8f0e7ab1285ff34c2343365
GitHub-Last-Rev: 0a720d0c3e4e72e7150d5a08e61d7a2180b8a7a8
GitHub-Pull-Request: golang/vscode-go#234
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/238358
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/build/all.bash b/build/all.bash
index f5e871f..f658f90 100755
--- a/build/all.bash
+++ b/build/all.bash
@@ -77,10 +77,12 @@
 .bugs.url="https://github.com/golang/vscode-go/issues"
 ') > /tmp/package.json && mv /tmp/package.json package.json
 
-  # Replace CHANGELOG.md with CHANGELOG.md.nightly + Release commit info.
-  printf "**Release ${VER} @ ${COMMIT}** \n\n" | cat - docs/nightly/CHANGELOG.md > /tmp/CHANGELOG.md.new && mv /tmp/CHANGELOG.md.new CHANGELOG.md
+  # Replace CHANGELOG.md with CHANGELOG.md + Release commit info.
+  printf "**Release ${VER} @ ${COMMIT}** \n\n" | cat - CHANGELOG.md > /tmp/CHANGELOG.md.new && mv /tmp/CHANGELOG.md.new CHANGELOG.md
   # Replace the heading of README.md with the heading for Go Nightly.
-  sed '/^# Go for Visual Studio Code$/d' README.md | cat docs/nightly/README.md - > /tmp/README.md.new && mv /tmp/README.md.new README.md
+  sed '/^# Go for Visual Studio Code$/d' README.md | cat build/nightly/README.md - > /tmp/README.md.new && mv /tmp/README.md.new README.md
+  # Replace src/const.ts with build/nightly/const.ts.
+  cp build/nightly/const.ts src/const.ts
 }
 
 main() {
diff --git a/docs/nightly/README.md b/build/nightly/README.md
similarity index 100%
rename from docs/nightly/README.md
rename to build/nightly/README.md
diff --git a/src/telemetry.ts b/build/nightly/const.ts
similarity index 65%
rename from src/telemetry.ts
rename to build/nightly/const.ts
index 7bf6d49..7cb042b 100644
--- a/src/telemetry.ts
+++ b/build/nightly/const.ts
@@ -1,8 +1,9 @@
 /*---------------------------------------------------------
  * Copyright (C) Microsoft Corporation. All rights reserved.
+ * Modification copyright 2020 The Go Authors. All rights reserved.
  * Licensed under the MIT License. See LICENSE in the project root for license information.
  *--------------------------------------------------------*/
 
-// TODO(hyangah): move this somewhere else (where easily modifiable during release process)
+// This file contains constants that replace constants defined in src/const.ts when building Nightly
 
 export const extensionId: string = 'golang.go-nightly';
diff --git a/docs/nightly/CHANGELOG.md b/docs/nightly/CHANGELOG.md
deleted file mode 100644
index f93a946..0000000
--- a/docs/nightly/CHANGELOG.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## 2020.3.x
-* Set the extension name for VS Code Go Nightly(`go-nightly`).
-* Pick up the pre-release version of `gopls` if available.
-* Disabled the telemetry report for VS Code Go.
diff --git a/package-lock.json b/package-lock.json
index b74d1ae..ce0f081 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
-  "name": "go-nightly",
-  "version": "0.0.0",
+  "name": "go",
+  "version": "0.15.0-dev",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/package.json b/package.json
index 1dc7e8d..2cf105b 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,9 @@
 {
-  "name": "go-nightly",
-  "displayName": "Go Nightly",
-  "version": "0.0.0",
+  "name": "go",
+  "displayName": "Go",
+  "version": "0.15.0-dev",
   "publisher": "golang",
-  "description": "Rich Go language support for Visual Studio Code (Nightly)",
+  "description": "Rich Go language support for Visual Studio Code",
   "author": {
     "name": "Go Team at Google"
   },
diff --git a/src/const.ts b/src/const.ts
new file mode 100644
index 0000000..3783d8b
--- /dev/null
+++ b/src/const.ts
@@ -0,0 +1,12 @@
+/*---------------------------------------------------------
+ * Copyright (C) Microsoft Corporation. All rights reserved.
+ * Modification copyright 2020 The Go Authors. All rights reserved.
+ * Licensed under the MIT License. See LICENSE in the project root for license information.
+ *--------------------------------------------------------*/
+
+// This file contains constants that need to change when building Nightly or Go2Go.
+//
+// For example, we replace this file with the version in the build/nightly.
+// Make sure to reflect any changes in this file to build/nightly/const.ts.
+
+export const extensionId: string = 'golang.go';
diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts
index f6fac7f..6818e34 100644
--- a/src/goLanguageServer.ts
+++ b/src/goLanguageServer.ts
@@ -20,6 +20,7 @@
 	RevealOutputChannelOn,
 } from 'vscode-languageclient';
 import WebRequest = require('web-request');
+import { extensionId } from './const';
 import { GoDefinitionProvider } from './goDeclaration';
 import { toolExecutionEnvironment } from './goEnv';
 import { GoHoverProvider } from './goExtraInfo';
@@ -446,7 +447,6 @@
 	return vscode.workspace.workspaceFolders.find((x) => tempGopath !== getCurrentGoPath(x.uri)) ? false : true;
 }
 
-const acceptGoplsPrerelease = true;  // For nightly, we accept the prerelease version.
 export async function shouldUpdateLanguageServer(
 	tool: Tool,
 	languageServerToolPath: string,
@@ -549,6 +549,8 @@
 	return time;
 };
 
+const acceptGoplsPrerelease = (extensionId === 'golang.go-nightly');
+
 export const getLatestGoplsVersion = async (tool: Tool) => {
 	// If the user has a version of gopls that we understand,
 	// ask the proxy for the latest version, and if the user's version is older,
diff --git a/src/util.ts b/src/util.ts
index 4de9508..556e52f 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -12,6 +12,7 @@
 import util = require('util');
 import vscode = require('vscode');
 import { NearestNeighborDict, Node } from './avlTree';
+import { extensionId } from './const';
 import { toolExecutionEnvironment } from './goEnv';
 import { buildDiagnosticCollection, lintDiagnosticCollection, vetDiagnosticCollection } from './goMain';
 import { getCurrentPackage } from './goModules';
@@ -24,7 +25,6 @@
 	resolveHomeDir,
 } from './goPath';
 import { outputChannel } from './goStatus';
-import { extensionId } from './telemetry';
 
 let userNameHash: number = 0;
 
diff --git a/test/gopls/extension.test.ts b/test/gopls/extension.test.ts
index 3068a3b..64cddfc 100644
--- a/test/gopls/extension.test.ts
+++ b/test/gopls/extension.test.ts
@@ -7,7 +7,7 @@
 import * as fs from 'fs-extra';
 import * as path from 'path';
 import * as vscode from 'vscode';
-import { extensionId } from '../../src/telemetry';
+import { extensionId } from '../../src/const';
 
 // Env is a collection of test related variables
 // that define the test environment such as vscode workspace.
diff --git a/test/runTest.ts b/test/runTest.ts
index 1f5aa01..d7656e6 100644
--- a/test/runTest.ts
+++ b/test/runTest.ts
@@ -1,7 +1,7 @@
 import * as fs from 'fs-extra';
 import * as path from 'path';
 import { runTests } from 'vscode-test';
-import { extensionId } from '../src/telemetry';
+import { extensionId } from '../src/const';
 
 async function main() {
 		// The folder containing the Extension Manifest package.json