Signals backward-compatible changes to the module’s public API. This release guarantees backward compatibility and stability.

vx.4.x
Using the same example from the major version number, imagine you have a method named UserAddress that returns a string:

func UserAddress(username string) string {
	// return user address as a string
}
Signals backward-compatible changes to the module’s public API. This release guarantees backward compatibility and stability.

vx.4.x
A major version update to a number higher than v1 will also have a new module path. That’s because the module path will have the major version number appended, as in the following example:

module example.com/mymodule/v2 v2.0.0
Signals changes that don’t affect the module’s public API or its dependencies. This release guarantees backward compatibility and stability.

vx.x.1
Signals that this is a pre-release milestone, such as an alpha or beta. This release carries no stability guarantees.

vx.x.x-beta.2
Using the same example from the major version number, imagine you have a method named UserAddress that returns a string:

func UserAddress(username string) string {
	// return user address as a string
}
This time, though, instead of updating UserAddress to return *Address, you decide to add a completely new method named UserAddressDetail:

type Address struct {
	Address    string
	PostalCode string
}

func UserAddress(username string) string {
	// return user address as a string
}

func UserAddressDetail(username string) *Address {
	// return user address and postal code struct
}
The following example shows the usage of minor() method.

#!/usr/bin/python3
import os, sys

path = "/var/www/html/foo.txt"

# Now get the touple
info = os.lstat(path)

# Get major and minor device number
major_dnum = os.major(info.st_dev)
minor_dnum = os.minor(info.st_dev)

print ("Major Device Number :", major_dnum)
print ("Minor Device Number :", minor_dnum)
The following example shows the usage of the fabs() method.

#!/usr/bin/python3
import math   # This will import math module

print ("math.fabs(-45.17) : ", math.fabs(-45.17))
print ("math.fabs(100.12) : ", math.fabs(100.12))
print ("math.fabs(100.72) : ", math.fabs(100.72))
print ("math.fabs(math.pi) : ", math.fabs(math.pi))
The following example shows the usage of the pow() method.

#!/usr/bin/python3
import math   # This will import math module

print ("math.pow(100, 2) : ", math.pow(100, 2))
print ("math.pow(100, -2) : ", math.pow(100, -2))
print ("math.pow(2, 4) : ", math.pow(2, 4))
print ("math.pow(3, 0) : ", math.pow(3, 0))
The following example shows the usage of the log() method.

#!/usr/bin/python3
import math   # This will import math module

print ("math.log(100.12) : ", math.log(100.12))
print ("math.log(100.72) : ", math.log(100.72))
print ("math.log(math.pi) : ", math.log(math.pi))

Recommend

Go Module version numbering Pre-release version Example

Go Managing module source Organizing code in the repository

Go go.mod file reference retract Notes

Go go.mod file reference retract Example

Go go.mod file reference retract Syntax

Go go.mod file reference exclude Notes

Go go.mod file reference exclude Example

Go go.mod file reference exclude Syntax

Go go.mod file reference replace Notes

Go go.mod file reference replace Examples

Go go.mod file reference replace Syntax

Go go.mod file reference require Syntax

Go go.mod file reference go Syntax

Go go.mod file reference module Notes

Go go.mod file reference module Examples

Go go.mod file reference module Syntax

Go go.mod file reference Example

Go go.mod file reference

Go Publishing a module Publishing steps

Go Developing a major version update Branching for a major release

Go Module release and versioning workflow Publishing breaking API changes

Go Module release and versioning workflow Publishing the first stable version

Go Module release and versioning workflow Publishing the first (unstable) version

Go Module release and versioning workflow Publishing pre-release versions

Go Contribution Guide Miscellaneous topics Sending multiple dependent changes

Go Contribution Guide Miscellaneous topics Set up git aliases

Go Contribution Guide Miscellaneous topics Reviewing code by others

Go Contribution Guide Miscellaneous topics Synchronize your client

Go Contribution Guide Miscellaneous topics Specifying a reviewer / CCing others

Go Contribution Guide Miscellaneous topics Quickly testing your changes

Go Contribution Guide Miscellaneous topics Troubleshooting mail errors

Go Contribution Guide Miscellaneous topics Copyright headers

Contribution Guide Good commit messages

Go Contribution Guide Sending a change via Gerrit Step 5: Revise changes after a review

Go Contribution Guide Sending a change via Gerrit Step 4: Send changes for review

Go Contribution Guide Sending a change via Gerrit Step 3: Test your changes In the golang.org/x/... repositories

Contribution Guide Sending a change via Gerrit Step 3: Test your changes In the main Go repository

Go Contribution Guide Sending a change via Gerrit Step 2: Prepare changes in a new branch

Go Contribution Guide Sending a change via Gerrit Step 1: Clone the source code

Go Contribution Guide Sending a change via Gerrit Overview

Go Contribution Guide Becoming a contributor Step 4: Install the git-codereview command

Contribution Guide Becoming a contributor Step 0: Select a Google Account

Go Contribution Guide Becoming a contributor Overview

Go Diagnostics Debugging

Go Diagnostics Profiling

How to Write Go Code Testing

How to Write Go Code Your first program Importing packages from remote modules

How to Write Go Code Your first program Importing packages from your module

How to Write Go Code Your first program

The Go Programming Language Specification System considerations Size and alignment guarantees

The Go Programming Language Specification System considerations Package unsafe