go bits_errors_bootstrap 源码

2022-07-15 浏览 (1014)

golang bits_errors_bootstrap 代码

文件路径:/src/math/bits/bits_errors_bootstrap.go

// Copyright 2019 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.

//go:build compiler_bootstrap
// +build compiler_bootstrap

// This version used only for bootstrap (on this path we want
// to avoid use of go:linkname as applied to variables).

package bits

type errorString string

func (e errorString) RuntimeError() {}

func (e errorString) Error() string {
	return "runtime error: " + string(e)
}

var overflowError = error(errorString("integer overflow"))

var divideError = error(errorString("integer divide by zero"))

相关信息

go 源码目录

相关文章

go bits 源码

go bits_errors 源码

go bits_tables 源码

go bits_test 源码

go example_math_test 源码

go example_test 源码

go export_test 源码

go make_examples 源码

go make_tables 源码

  • 所属分类: 后端技术
  • 本文标签: golang
  • 版权声明: 本文链接 https://seaxiang.com/blog/2a366deb19a04df58dd097ec47d4f51c