go.internal.godebug 1.24.13.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package go.internal.godebug --version 1.24.13.1
                    
NuGet\Install-Package go.internal.godebug -Version 1.24.13.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="go.internal.godebug" Version="1.24.13.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="go.internal.godebug" Version="1.24.13.1" />
                    
Directory.Packages.props
<PackageReference Include="go.internal.godebug" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add go.internal.godebug --version 1.24.13.1
                    
#r "nuget: go.internal.godebug, 1.24.13.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package go.internal.godebug@1.24.13.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=go.internal.godebug&version=1.24.13.1
                    
Install as a Cake Addin
#tool nuget:?package=go.internal.godebug&version=1.24.13.1
                    
Install as a Cake Tool

go.internal.godebug

C# package converted from the Go standard library by go2cs.

Tests Docs
Source Source

Package godebug makes the settings in the $GODEBUG environment variable available to other packages. These settings are often used for compatibility tweaks, when we need to change a default behavior but want to let users opt back in to the original. For example GODEBUG=http2server=0 disables HTTP/2 support in the net/http server.

In typical usage, code should declare a Setting as a global and then call Value each time the current setting value is needed:

var http2server = godebug.New("http2server")

func ServeConn(c net.Conn) {
	if http2server.Value() == "0" {
		disallow HTTP/2
		...
	}
	...
}

Each time a non-default setting causes a change in program behavior, code must call [Setting.IncNonDefault] to increment a counter that can be reported by runtime/metrics.Read. The call must only happen when the program executes a non-default behavior, not just when the setting is set to a non-default value. This is occasionally (but very rarely) infeasible, in which case the internal/godebugs table entry must set Opaque: true, and the documentation in doc/godebug.md should mention that metrics are unavailable.

Conventionally, the global variable representing a godebug is named for the godebug itself, with no case changes:

var gotypesalias = godebug.New("gotypesalias") // this
var goTypesAlias = godebug.New("gotypesalias") // NOT THIS

The test in internal/godebugs that checks for use of IncNonDefault requires the use of this convention.

Note that counters used with IncNonDefault must be added to various tables in other packages. See the [Setting.IncNonDefault] documentation for details.


Copyright 2009 The Go Authors. All rights reserved. This C# package is converted from Go standard library source; use of that source is governed by a BSD-style license that can be found in the LICENSE file.

Artwork licensed under Creative Commons Attribution 3.0; see artwork attribution.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (23)

Showing the top 5 NuGet packages that depend on go.internal.godebug:

Package Downloads
go.time

time (net10.0 - Release) -- C# project converted from Go source

go.os

os (net10.0 - Release) -- C# project converted from Go source

go.math.rand

math.rand (net10.0 - Release) -- C# project converted from Go source

go.net

net (net10.0 - Release) -- C# project converted from Go source

go.net.url

net.url (net10.0 - Release) -- C# project converted from Go source

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.24.13.2 624 9/24/2026
1.24.13.1 798 9/24/2026
1.23.12.3 1,554 9/8/2026
1.23.12.2 1,379 8/29/2026
1.23.12.1 1,483 8/26/2026
1.23.1.7 2,454 8/23/2026
1.23.1.6 2,039 8/11/2026
1.23.1.5 2,057 8/9/2026
1.23.1.4 2,016 8/8/2026
1.23.1.3 2,327 8/4/2026
1.23.1.2 2,436 7/27/2026
1.23.1.1 2,519 7/14/2026