<commit_before>// Copyright 2012 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"fmt"
	"os"
)

/*
 * Helpers for building runtime.
 */

// mkzversion writes zversion.go:
//
//	package runtime
//	const defaultGoroot = <goroot>
//	const theVersion = <version>
//
func mkzversion(dir, file string) {
	out := fmt.Sprintf(
		"// auto generated by go tool dist\n"+
			"\n"+
			"package runtime\n"+
			"\n"+
			"const defaultGoroot = `%s`\n"+
			"const theVersion = `%s`\n"+
			"const goexperiment = `%s`\n"+
			"var buildVersion = theVersion\n", goroot_final, findgoversion(), os.Getenv("GOEXPERIMENT"))

	writefile(out, file, 0)
}

// mkzbootstrap writes cmd/internal/obj/zbootstrap.go:
//
//	package obj
//
//	const defaultGOROOT = <goroot>
//	const defaultGOARM = <goarm>
//	const defaultGOOS = <goos>
//	const defaultGOARCH = <goarch>
//	const version = <version>
//	const goexperiment = <goexperiment>
//
func mkzbootstrap(file string) {
	out := fmt.Sprintf(
		"// auto generated by go tool dist\n"+
			"\n"+
			"package obj\n"+
			"\n"+
			"const defaultGOROOT = `%s`\n"+
			"const defaultGOARM = `%s`\n"+
			"const defaultGOOS = `%s`\n"+
			"const defaultGOARCH = `%s`\n"+
			"const version = `%s`\n"+
			"const goexperiment = `%s`\n",
		goroot_final, goarm, gohostos, gohostarch, findgoversion(), os.Getenv("GOEXPERIMENT"))

	writefile(out, file, 0)
}<commit_msg>[dev.cc] cmd/dist: write default GO386 for cmd/internal/obj<commit_after>// Copyright 2012 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import (
	"fmt"
	"os"
)

/*
 * Helpers for building runtime.
 */

// mkzversion writes zversion.go:
//
//	package runtime
//	const defaultGoroot = <goroot>
//	const theVersion = <version>
//
func mkzversion(dir, file string) {
	out := fmt.Sprintf(
		"// auto generated by go tool dist\n"+
			"\n"+
			"package runtime\n"+
			"\n"+
			"const defaultGoroot = `%s`\n"+
			"const theVersion = `%s`\n"+
			"const goexperiment = `%s`\n"+
			"var buildVersion = theVersion\n", goroot_final, findgoversion(), os.Getenv("GOEXPERIMENT"))

	writefile(out, file, 0)
}

// mkzbootstrap writes cmd/internal/obj/zbootstrap.go:
//
//	package obj
//
//	const defaultGOROOT = <goroot>
//	const defaultGO386 = <go386>
//	const defaultGOARM = <goarm>
//	const defaultGOOS = <goos>
//	const defaultGOARCH = <goarch>
//	const version = <version>
//	const goexperiment = <goexperiment>
//
func mkzbootstrap(file string) {
	out := fmt.Sprintf(
		"// auto generated by go tool dist\n"+
			"\n"+
			"package obj\n"+
			"\n"+
			"const defaultGOROOT = `%s`\n"+
			"const defaultGO386 = `%s`\n"+
			"const defaultGOARM = `%s`\n"+
			"const defaultGOOS = `%s`\n"+
			"const defaultGOARCH = `%s`\n"+
			"const version = `%s`\n"+
			"const goexperiment = `%s`\n",
		goroot_final, go386, goarm, gohostos, gohostarch, findgoversion(), os.Getenv("GOEXPERIMENT"))

	writefile(out, file, 0)
}
{'fraction_non_alphanumeric': 0.1693104564584008, 'fraction_numerical': 0.008740692780835222, 'mean_word_length': 3.3216783216783217, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3923742', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1146, 'n_words': 307}