Go, also known as Golang, is an open-source programming language developed by Google. It is designed for simplicity, efficiency, and strong performance.
Go is used in web development to build scalable applications and APIs, in cloud services to develop microservices, and in DevOps to develop automation tools. It’s also popular for networking servers and large-scale data processing tasks.
Many companies need developers who know Go, especially for backend, cloud, and DevOps roles.
Check out API guides on Go programming: Golang Standard Library (Learn 500+ in-built functions).
Go Tutorial
- What is Go Programming?
- Setting Up the Go Environment
- Your First Go Program
- The Structure of a Go Program
- Go Comments
- Go Data Types
- Go Variables
- Go Constants
- Go Operators
- Go Arithmetic Operators
- Go Relational Operators
- Go Logical Operators
- Go Bitwise Operators
- Go Assignment Operators
Go Control Flow Statements
- Go If-Else
- Go Switch Statement
- Go for Loop
- Go for-range Construct
- Go goto Statement
- Go break Statement
- Go continue Statement
Go Functions
Go Arrays and Strings
- Go Arrays
- Go Slices
- Go Command Line Arguments
- Go Strings
- Go String Functions
- Go String Formatting
- Go Text Templates
- Go Regex
- Go User Input
Go Packages and Modules
Go Types
Go Map
Go Error Handling
Go Concurrency
- Go Concurrency
- Goroutines
- Go Channels
- Go Channel Buffering
- Go Channel Synchronization
- Go Select
- Go Channel Directions
- Go Race Conditions
- Go Mutex
- Go Atomic Variables
Go File Handling
- Go Reading Files
- Go Writing Files
- Go Line Filters
- Go File Paths
- Go Directories
- Go Temporary Files and Directories
Go Networking
Go Time
Go Programs with Output
- Go Program to Print Hello World
- Go Program to Add Two Numbers
- Go Program to Swap Two Variables
- Go Program to Check Even or Odd Number
- Go Program to Find the Factorial of a Number
- Go Program to Check if a Number is Prime
- Go Program to Generate Fibonacci Series
- Go Program to Find the Greatest of Three Numbers
- Go Program to Reverse a String
- Go Program to Check if a String is a Palindrome
- Go Program to Find the Sum of Elements in an Array
- Go Program to Find the Largest Element in an Array
- Go Program to Sort an Array Using Bubble Sort
- Go Program to Reverse an Array
- Go Program to Implement Binary Search
- Go Program to Find the Second Largest Element in an Array
- Go Program to Remove Duplicates from an Array
- Go Program to Merge Two Arrays
- Go Program to Find the Frequency of Elements in an Array
- Go Program to Find the Length of a String
- Go Program to Convert a String to Uppercase
- Go Program to Convert a String to Lowercase
- Go Program to Concatenate Two Strings
- Go Program to Reverse Each Word in a String
- Go Program to Count the Number of Words in a String
- Go Program to Replace a Character in a String
- Go Program to Remove Whitespace from a String
- Go Program to Check if a String Contains Only Digits
- Go Program to Create and Initialize a Slice
- Go Program to Append Elements to a Slice
- Go Program to Copy a Slice
- Go Program to Remove an Element from a Slice
- Go Program to Merge Two Slices
- Go Program to Iterate Over a Map
- Go Program to Add Key-Value Pairs to a Map
- Go Program to Delete a Key from a Map
- Go Program to Check if a Key Exists in a Map
- Go Program to Find the Length of a Map
- Go Program to Create and Initialize a Struct
- Go Program to Access and Modify Struct Fields
- Go Program to Embed Structs
- Go Program to Implements for a Struct
- Go Program to Compare Two Structs
- Go Program to Check if Two Strings Are Anagrams
- Go Program to Find the Longest Substring Without Repeating Characters
- Go Program to Find the First Non-Repeated Character in a String
- Go Program to Count the Frequency of Each Character in a String
- Go Program to Read a File
- Go Program to Write to a File
- Go Program to Append Data to a File
- Go Program to Check if a File Exists
- Go Program to Delete a File
- Go Program to Rename a File
- Go Program to Copy a File
- Go Program to Create a Directory
- Go Program to List Files in a Directory
- Go Program to Read a File Line by Line
- Go Program to Handle Errors with the Error Type
- Go Program to Create Custom Errors
- Go Program to Use Panic and Recover
- Go Program to Handle Multiple Errors
- Go Program to Implement Logging in Error Handling
- Go Program to Validate User Input with Error Handling
- Go Program to Count Digits in a Number
- Go Program to Find the Cube of a Number
- Go Program to Calculate the Employee Salary
Go Standard Library
Golang fmt Package Functions
The fmt
package in Go provides formatting for input and output, offering a wide range of functions to handle strings, errors, and formatted I/O. Below is a list of commonly used functions in the fmt
package:
Function | Description |
---|---|
Golang fmt.Append Function | Appends a formatted string to a byte slice. |
Golang fmt.Appendf Function | Writes the formatted string to a specified writer with format specifiers. |
Golang fmt.Appendln Function | Appends a formatted string to a byte slice, followed by a newline. |
Golang fmt.Errorf Function | Formats according to a format specifier and returns a string as a value that satisfies the error interface. |
Golang fmt.Sprintf Function | Formats according to a format specifier and returns the resulting string. |
Golang fmt.Fprint Function | Writes the string to a specified writer, such as a file or an HTTP response. |
Golang fmt.Fprintf Function | It reads from a specified reader and scans the input. |
Golang fmt.Fprintln Function | Writes the string to a specified writer, followed by a newline. |
Golang fmt.Fscan Function | Reads from a specified reader, scanning the input. |
Golang fmt.Fscanf Function | Reads from a specified reader, scanning the input with format specifiers. |
Golang fmt.Fscanln Function | Reads from a specified reader, scanning the input until a newline. |
Golang fmt.Print Function | Prints the string to standard output. |
Golang fmt.Printf Function | Prints the formatted string to standard output, with format specifiers. |
Golang fmt.Println Function | Prints the string to standard output, followed by a newline. |
Golang fmt.Scan Function | Reads from standard input, scanning the input. |
Golang fmt.Scanf Function | Reads from standard input, scanning the input with format specifiers. |
Golang fmt.Scanln Function | Reads from standard input, scanning the input until a newline. |
Golang fmt.Sprint Function | Formats using the default formats for its operands and returns the resulting string. |
Golang fmt.Sprintf Function | Formats according to a format specifier and returns the resulting string. |
Golang fmt.Sprintln Function | Formats using the default formats for its operands and returns the resulting string, followed by a newline. |
Golang fmt.Sscan Function | Scans the string for the specified formats. |
Golang fmt.Sscanf Function | Scans the string for the specified formats with format specifiers. |
Golang fmt.Sscanln Function | Scans the string for the specified formats until a newline is encountered. |
Golang strings Package Functions
The strings
package in Go provides functions to manipulate UTF-8 encoded strings. It includes various utilities for searching, splitting, trimming, and formatting strings. Below is a list of commonly used functions in the strings
package:
Function | Description |
---|---|
Golang strings.Clone Function | Returns a newly allocated copy of the input string. |
Golang strings.Compare Function | Compares two strings lexicographically. |
Golang strings.Contains Function | Checks if a substring is within a string. |
Golang strings.ContainsAny Function | Checks if any of the characters in a string exist in another string. |
Golang strings.ContainsFunc Function | Checks if a string contains any characters satisfying a predicate function. |
Golang strings.ContainsRune Function | Checks if a rune is within a string. |
Golang strings.Count Function | Counts the number of non-overlapping instances of a substring in a string. |
Golang strings.Cut Function | Splits a string at the first occurrence of a substring and returns the two parts. |
Golang strings.CutPrefix Function | Removes the provided prefix from a string. |
Golang strings.CutSuffix Function | Removes the provided suffix from a string. |
Golang strings.EqualFold Function | Compares two strings for equality under Unicode case-folding. |
Golang strings.Fields Function | Splits a string into substrings at each instance of whitespace. |
Golang strings.FieldsFunc Function | Splits a string based on a custom function that determines where splits should occur. |
Golang strings.Split Function | Splits a string into substrings separated by a specified delimiter. |
Golang strings.SplitAfter Function | Splits a string into substrings after each instance of a specified delimiter. |
Golang strings.SplitAfterN Function | Splits a string into N substrings after each instance of a specified delimiter. |
Golang strings.SplitN Function | Splits a string into N substrings separated by a specified delimiter. |
Golang strings.Title Function | Converts a string to title case. |
Golang strings.ToLower Function | Converts all characters in a string to lowercase. |
Golang strings.ToTitle Function | Converts all characters in a string to title case. |
Golang strings.ToUpper Function | Converts all characters in a string to uppercase. |
Golang strings.Trim Function | Removes all leading and trailing instances of specified characters from a string. |
Golang strings.TrimFunc Function | Removes all leading and trailing instances of characters from a string based on a predicate function. |
Golang strings.TrimLeft Function | Removes all leading instances of specified characters from a string. |
Golang strings.TrimLeftFunc Function | Removes all leading instances of characters from a string based on a predicate function. |
Golang strings.TrimPrefix Function | Removes a specified prefix from a string. |
Golang strings.TrimRight Function | Removes all trailing instances of specified characters from a string. |
Golang strings.TrimSpace Function | Removes all leading and trailing white space from a string. |
Golang strings.TrimSuffix Function | Removes a specified suffix from a string. |
Golang strings.Join Function | Joins a slice of strings into a single string with a specified separator. |
Golang strings.HasSuffix Function | Checks if a string ends with a specified suffix. |
Golang strings.HasPrefix Function | Checks if a string starts with a specified prefix. |
Golang strings.Index Function | Finds the index of the first instance of a substring in a string. |
Golang math Package Functions
The math
package in Go provides basic constants and mathematical functions such as trigonometric, logarithmic, and exponential functions. Below is a list of commonly used functions in the math
package:
Function | Description |
---|---|
Golang math.Abs Function | Returns the absolute value of a given float number. |
Golang math.Ceil Function | Returns the smallest integer value greater than or equal to the input. |
Golang math.Floor Function | Returns the largest integer value less than or equal to the input. |
Golang math.Trunc Function | Returns the integer part of a float number, discarding the fractional part. |
Golang math.Mod Function | Returns the floating-point remainder of the division of two numbers. |
Golang math.Modf Function | Returns the fractional and integer parts of a floating-point number. |
Golang math.Remainder Function | Computes the remainder of the floating-point division of two numbers. |
Golang math.Round Function | Rounds the floating-point number to the nearest integer, breaking ties by rounding away from zero. |
Golang math.RoundToEven Function | Rounds the floating-point number to the nearest integer, breaking ties by rounding to the even number. |
Golang math.Copysign Function | Returns a number with the magnitude of the first argument and the sign of the second. |
Golang math.Signbit Function | Checks whether the sign of a floating-point number is negative. |
Golang math.Dim Function | Computes the positive difference between two numbers. |
Golang math.Min Function | Returns the smaller of two floating-point numbers. |
Golang math.FMA Function | Computes the fused multiply-add of three numbers. |
Golang math.Exp Function | Returns the exponential value of the input. |
Golang math.Exp2 Function | Returns the base-2 exponential value of the input. |
Golang math.Expm1 Function | Returns the value of (e^x – 1) of the input. |
Golang math.Log Function | Returns the natural logarithm of the input. |
Golang math.Log10 Function | Returns the base-10 logarithm of the input. |
Golang math.Log1p Function | Returns the natural logarithm of (1 + x) of the input. |
Golang math.Log2 Function | Returns the base-2 logarithm of the input. |
Golang math.Logb Function | Returns the exponent of the input number. |
Golang math.Ilogb Function | Returns the exponent of the input number as an integer. |
Golang math.Pow Function | Returns the base raised to the power of the exponent. |
Golang math.Pow10 Function | Returns the value of 10 raised to the power of the input. |
Golang math.Sqrt Function | Returns the square root of the input. |
Golang math.Cbrt Function | Returns the cube root of the input. |
Golang math.Sin Function | Returns the sine of the input angle. |
Golang math.Cos Function | Returns the cosine of the input angle. |
Golang math.Tan Function | Returns the tangent of the input angle. |
Golang math.Asin Function | Returns the arcsine of the input. |
Golang math.Acos Function | Returns the arccosine of the input. |
Golang math.Atan Function | Returns the arctangent of the input. |
Golang math.Atan2 Function | Returns the arctangent of y/x considering the sign of both arguments. |
Golang math.Hypot Function | Returns the square root of the sum of the squares of two inputs (the hypotenuse). |
Golang math.Sincos Function | Computes the sine and cosine of the input angle, returning both. |
Golang math.Sinh Function | Returns the hyperbolic sine of the input. |
Golang math.Cosh Function | Returns the hyperbolic cosine of the input. |
Golang math.Asinh Function | Returns the inverse hyperbolic sine of the input. |
Golang math.Acosh Function | Returns the inverse hyperbolic cosine of the input. |
Golang math.Atanh Function | Returns the inverse hyperbolic tangent of the input. |
Golang math.Gamma Function | Computes the Gamma function of the input. |
Golang math.Lgamma Function | Returns the natural logarithm of the absolute value of the Gamma function. |
Golang math.Erf Function | Computes the error function of the input. |
Golang math.Erfc Function | Computes the complementary error function of the input. |
Golang math.Erfinv Function | Computes the inverse of the error function. |
Golang math.Erfcinv Function | Computes the inverse of the complementary error function. |
Golang math.Float32bits Function | Returns the IEEE 754 binary representation of a 32-bit float as an unsigned integer. |
Golang math.Float32frombits Function | Returns the 32-bit float value corresponding to the given IEEE 754 binary representation. |
Golang math.Float64bits Function | Returns the IEEE 754 binary representation of a 64-bit float as an unsigned integer. |
Golang math.IsInf Function | Checks whether the input is an infinite number. |
Golang math.IsNaN Function | Checks whether the input is Not-a-Number (NaN). |
Golang math.Nextafter Function | Returns the next representable float value after x towards y. |
Golang math.Nextafter32 Function | Returns the next representable float value after x towards y for 32-bit floats. |
Golang math.Frexp Function | Breaks the floating-point number into a normalized fraction and an integral power of two. |
Golang math.Ldexp Function | Computes the value of x multiplied by 2 raised to the power of exp. |
Golang math Package Functions
The math
package in Go provides basic constants and mathematical functions such as trigonometric, logarithmic, and exponential functions. Below is a list of commonly used functions in the math
package:
Function | Description |
---|---|
Golang math.Abs Function | Returns the absolute value of a given float number. |
Golang math.Ceil Function | Returns the smallest integer value greater than or equal to the input. |
Golang math.Floor Function | Returns the largest integer value less than or equal to the input. |
Golang math.Trunc Function | Returns the integer part of a float number, discarding the fractional part. |
Golang math.Mod Function | Returns the floating-point remainder of the division of two numbers. |
Golang math.Modf Function | Returns the fractional and integer parts of a floating-point number. |
Golang math.Remainder Function | Computes the remainder of the floating-point division of two numbers. |
Golang math.Round Function | Rounds the floating-point number to the nearest integer, breaking ties by rounding away from zero. |
Golang math.RoundToEven Function | Rounds the floating-point number to the nearest integer, breaking ties by rounding to the even number. |
Golang math.Copysign Function | Returns a number with the magnitude of the first argument and the sign of the second. |
Golang math.Signbit Function | Checks whether the sign of a floating-point number is negative. |
Golang math.Dim Function | Computes the positive difference between two numbers. |
Golang math.Min Function | Returns the smaller of two floating-point numbers. |
Golang math.FMA Function | Computes the fused multiply-add of three numbers. |
Golang math.Exp Function | Returns the exponential value of the input. |
Golang math.Exp2 Function | Returns the base-2 exponential value of the input. |
Golang math.Expm1 Function | Returns the value of (e^x – 1) of the input. |
Golang math.Log Function | Returns the natural logarithm of the input. |
Golang math.Log10 Function | Returns the base-10 logarithm of the input. |
Golang math.Log1p Function | Returns the natural logarithm of (1 + x) of the input. |
Golang math.Log2 Function | Returns the base-2 logarithm of the input. |
Golang math.Logb Function | Returns the exponent of the input number. |
Golang math.Ilogb Function | Returns the exponent of the input number as an integer. |
Golang math.Pow Function | Returns the base raised to the power of the exponent. |
Golang math.Pow10 Function | Returns the value of 10 raised to the power of the input. |
Golang math.Sqrt Function | Returns the square root of the input. |
Golang math.Cbrt Function | Returns the cube root of the input. |
Golang math.Sin Function | Returns the sine of the input angle. |
Golang math.Cos Function | Returns the cosine of the input angle. |
Golang math.Tan Function | Returns the tangent of the input angle. |
Golang math.Asin Function | Returns the arcsine of the input. |
Golang math.Acos Function | Returns the arccosine of the input. |
Golang math.Atan Function | Returns the arctangent of the input. |
Golang math.Atan2 Function | Returns the arctangent of y/x considering the sign of both arguments. |
Golang math.Hypot Function | Returns the square root of the sum of the squares of two inputs (the hypotenuse). |
Golang math.Sincos Function | Computes the sine and cosine of the input angle, returning both. |
Golang math.Sinh Function | Returns the hyperbolic sine of the input. |
Golang math.Cosh Function | Returns the hyperbolic cosine of the input. |
Golang math.Asinh Function | Returns the inverse hyperbolic sine of the input. |
Golang math.Acosh Function | Returns the inverse hyperbolic cosine of the input. |
Golang math.Atanh Function | Returns the inverse hyperbolic tangent of the input. |
Golang math.Gamma Function | Computes the Gamma function of the input. |
Golang math.Lgamma Function | Returns the natural logarithm of the absolute value of the Gamma function. |
Golang math.Erf Function | Computes the error function of the input. |
Golang math.Erfc Function | Computes the complementary error function of the input. |
Golang math.Erfinv Function | Computes the inverse of the error function. |
Golang math.Erfcinv Function | Computes the inverse of the complementary error function. |
Golang math.Float32bits Function | Returns the IEEE 754 binary representation of a 32-bit float as an unsigned integer. |
Golang math.Float32frombits Function | Returns the 32-bit float value corresponding to the given IEEE 754 binary representation. |
Golang math.Float64bits Function | Returns the IEEE 754 binary representation of a 64-bit float as an unsigned integer. |
Golang math.IsInf Function | Checks whether the input is an infinite number. |
Golang math.IsNaN Function | Checks whether the input is Not-a-Number (NaN). |
Golang math.Nextafter Function | Returns the next representable float value after x towards y. |
Golang math.Nextafter32 Function | Returns the next representable float value after x towards y for 32-bit floats. |
Golang math.Frexp Function | Breaks the floating-point number into a normalized fraction and an integral power of two. |
Golang math.Ldexp Function | Computes the value of x multiplied by 2 raised to the power of exp. |
Golang time Package Functions
The time
package in Go provides functionality for measuring and displaying time. It includes functions for working with durations, time zones, formatting, and parsing time values. Below is a list of commonly used functions and methods in the time
package:
Function/Method | Description |
---|---|
Golang time.After Function | Returns a channel that will receive the current time after at least the specified duration has passed. |
Golang time.Sleep Function | Pauses the current goroutine for at least the specified duration. |
Golang time.Tick Function | Returns a channel that sends the time with a frequency specified by the duration. |
Golang time.ParseDuration Function | Parses a duration string and returns the corresponding duration. |
Golang time.Since Function | Returns the time elapsed since the specified time. |
Golang time.Until Function | Returns the duration until the specified time. |
Golang time.Duration.Abs | Returns the absolute value of the duration. |
Golang time.Duration.Hours | Returns the duration as a floating-point number of hours. |
Golang time.Duration.Microseconds | Returns the duration as an integer number of microseconds. |
Golang time.Duration.Milliseconds | Returns the duration as an integer number of milliseconds. |
Golang time.Duration.Minutes | Returns the duration as a floating-point number of minutes. |
Golang time.Duration.Seconds | Returns the duration as a floating-point number of seconds. |
Golang time.Duration.String | Returns a string representation of the duration. |
Golang time.Duration.Truncate | Truncates the duration to a multiple of another duration. |
Golang time.FixedZone Function | Returns a fixed time zone with a given name and offset in seconds. |
Golang time.LoadLocation Function | Returns the Location with the given name. |
Golang time.LoadLocationFromTZData Function | Returns a Location with the given name and timezone data. |
Golang time.Location.String | Returns a string representation of the Location. |
Golang time.ParseError.Error | Returns the error string of the ParseError. |
Golang time.Ticker.Reset | Resets the ticker to adjust its firing interval. |
Golang time.Date Function | Returns the Time corresponding to the specified date and time. |
Golang time.Now Function | Returns the current local time. |
Golang time.Parse Function | Parses a formatted string and returns the corresponding Time. |
Golang time.ParseInLocation Function | Parses a formatted string and returns the corresponding Time in the specified Location. |
Golang time.Unix Function | Returns the local time corresponding to the given Unix time. |
Golang time.UnixMicro Function | Returns the local time corresponding to the given Unix time in microseconds. |
Golang time.UnixMilli Function | Returns the local time corresponding to the given Unix time in milliseconds. |
Golang time.Time.Add | Adds the specified duration to the time and returns the result. |
Golang time.Time.AddDate | Adds the specified number of years, months, and days to the time and returns the result. |
Golang time.Time.After | Returns true if the time is after the specified time. |
Golang time.Time.AppendFormat | Appends the formatted time to a byte slice and returns the result. |
Golang time.Time.Before | Returns true if the time is before the specified time. |
Golang time.Time.Clock | Returns the hour, minute, and second of the time. |
Golang time.Time.Date | Returns the year, month, and day of the time. |
Golang time.Time.Day | Returns the day of the month. |
Golang time.Time.Equal | Reports whether the time is equal to the specified time. |
Golang time.Time.GoString | Returns a string representation of the time. |
Golang time.Time.Hour | Returns the hour within the day of the time. |
Golang time.Time.In | Returns the time in the specified location. |
Golang time.Time.Local | Returns the time in the local location. |
Golang time.Time.Location | Returns the time’s location information. |
Golang time.Time.MarshalJSON | Returns the JSON encoding of the time. |
Golang time.Time.Minute | Returns the minute within the hour of the time. |
Golang time.Time.Month | Returns the month of the time. |
Golang time.Time.Nanosecond | Returns the nanosecond within the second of the time. |
Golang time.Time.Second | Returns the second within the minute of the time. |
Golang time.Time.String | Returns a string representation of the time. |
Golang time.Time.Sub | Returns the duration between two times. |
Golang time.Time.Truncate | Truncates the time to a multiple of a duration. |
Golang time.Time.UTC | Returns the UTC time corresponding to the local time. |
Golang time.Time.Weekday | Returns the day of the week specified by the time. |
Golang time.Time.Year | Returns the year of the time. |
Golang time.Time.Zone | Returns the time zone abbreviation and offset in seconds east of UTC. |
Golang time.AfterFunc Function | Waits for the duration to elapse and then calls the provided function. |
Golang time.NewTimer Function | Creates a new Timer that will send the current time on its channel after at least the specified duration has passed. |
Golang time.Timer.Reset | Resets the timer to its original duration. |
Golang time.Timer.Stop | Stops the timer from sending any more events. |
Golang bytes Package Functions
The bytes
package in Go provides a variety of functions for manipulating byte slices. These functions are useful for searching, modifying, and comparing byte slices. Below is a list of commonly used functions in the bytes
package:
Function | Description |
---|---|
Golang bytes.Clone Function | Returns a copy of the given byte slice. |
Golang bytes.Compare Function | Compares two byte slices lexicographically. |
Golang bytes.Contains Function | Checks whether a byte slice contains another byte slice. |
Golang bytes.ContainsAny Function | Reports whether any of the bytes in the second slice are in the first slice. |
Golang bytes.ContainsFunc Function | Reports whether any byte in the slice satisfies the provided function. |
Golang bytes.ContainsRune Function | Reports whether the byte slice contains the given rune. |
Golang bytes.Count Function | Counts the number of non-overlapping instances of a sub-slice in a slice. |
Golang bytes.Cut Function | Splits a slice into two around the first instance of a separator. |
Golang bytes.CutPrefix Function | Removes the provided prefix from a byte slice. |
Golang bytes.CutSuffix Function | Removes the provided suffix from a byte slice. |
Golang bytes.Equal Function | Checks if two byte slices are equal. |
Golang bytes.EqualFold Function | Performs a case-insensitive comparison of two byte slices. |
Golang bytes.Fields Function | Splits the byte slice around each instance of one or more consecutive white space characters. |
Golang bytes.FieldsFunc Function | Splits the byte slice around each instance of a byte that satisfies the provided function. |
Golang bytes.Split Function | Splits a byte slice into all substrings separated by a separator and returns a slice of the substrings. |
Golang bytes.SplitAfter Function | Splits a byte slice after each instance of a separator and returns a slice of the substrings. |
Golang bytes.HasPrefix Function | Checks whether the byte slice begins with the specified prefix. |
Golang bytes.HasSuffix Function | Checks whether the byte slice ends with the specified suffix. |
Golang bytes.Index Function | Finds the first instance of a byte slice in another byte slice. |
Golang bytes.IndexAny Function | Finds the first instance of any byte from the second slice in the first slice. |
Golang bytes.IndexByte Function | Finds the first instance of the byte in the slice. |
Golang bytes.IndexFunc Function | Finds the first byte in the slice that satisfies the provided function. |
Golang bytes.LastIndex Function | Finds the last instance of a byte slice in another byte slice. |
Golang bytes.LastIndexByte Function | Finds the last instance of the byte in the slice. |
Golang bytes.Map Function | Applies a transformation function to each byte in the slice. |
Golang bytes.Repeat Function | Returns a new byte slice consisting of the specified number of copies of the original byte slice. |
Golang bytes.Replace Function | Returns a copy of the slice with all non-overlapping instances of the old slice replaced by the new slice. |
Golang bytes.ReplaceAll Function | Returns a copy of the slice with all instances of the old slice replaced by the new slice. |
Golang bytes.Runes Function | Converts the byte slice into a slice of runes (Unicode code points). |
Golang bytes.Title Function | Converts the byte slice to title case. |
Golang bytes.ToLower Function | Converts all the characters in the byte slice to lowercase. |
Golang bytes.ToUpper Function | Converts all the characters in the byte slice to uppercase. |
Golang bytes.Trim Function | Trims the leading and trailing bytes contained in the cutset from the slice. |
Golang bytes.TrimFunc Function | Trims the leading and trailing bytes that satisfy the provided function. |
Golang bytes.TrimLeft Function | Trims the leading bytes contained in the cutset from the slice. |
Golang bytes.TrimPrefix Function | Removes the specified prefix from the byte slice. |
Golang bytes.TrimRight Function | Trims the trailing bytes contained in the cutset from the slice. |
Golang bytes.TrimSpace Function | Trims all leading and trailing white space characters from the byte slice. |
Golang bytes.NewBuffer Function | Creates and returns a new buffer using the provided byte slice. |
Golang bytes.NewBufferString Function | Creates and returns a new buffer using the provided string. |
Golang http Package Functions
The http
package in Go is a powerful tool for building web servers and handling HTTP requests and responses. It provides a wide range of functions that help in managing HTTP connections, serving content, and processing requests. Below is a list of commonly used functions in the http
package:
Function | Description |
---|---|
Golang http.HandleFunc Function | Registers a function to handle requests for a given pattern. |
Golang http.ListenAndServe Function | Starts an HTTP server on a given address and serves incoming requests. |
Golang http.ListenAndServeTLS Function | Starts an HTTPS server with TLS on a given address and serves incoming requests. |
Golang http.Serve Function | Accepts incoming connections on a listener and serves HTTP requests. |
Golang http.ServeTLS Function | Accepts incoming TLS connections on a listener and serves HTTPS requests. |
Golang http.ServeFile Function | Serves a file from the server’s file system to the client. |
Golang http.ServeContent Function | Serves content from an io.ReadSeeker object, such as a file, to the client. |
Golang http.Redirect Function | Redirects the client to a different URL. |
Golang http.Error Function | Sends an error response to the client. |
Golang http.NotFound Function | Sends a 404 Not Found response to the client. |
Golang http.NotFoundHandler Function | Returns a handler that responds with a 404 Not Found. |
Golang http.RedirectHandler Function | Returns a handler that redirects the client to a different URL. |
Golang http.StripPrefix Function | Returns a handler that serves HTTP requests by removing the given prefix from the request URL’s path. |
Golang http.TimeoutHandler Function | Returns a handler that adds a timeout to another handler. |
Golang http.MaxBytesReader Function | Wraps an io.ReadCloser to enforce a maximum read limit. |
Golang http.NewRequest Function | Creates a new HTTP request with the given method, URL, and optional body. |
Golang http.ReadResponse Function | Reads and returns an HTTP response from a buffered reader. |
Golang http.NewRequestWithContext Function | Creates a new HTTP request with a context. |
Golang http.Get Function | Sends an HTTP GET request to the specified URL. |
Golang http.Post Function | Sends an HTTP POST request to the specified URL. |
Golang http.PostForm Function | Sends an HTTP POST request with form data. |
Golang http.ParseForm | Parses the raw query and updates the provided values. |
Golang url Package Functions
The url
package in Go is used for parsing and manipulating URLs. It provides functions for URL parsing, encoding, and constructing query parameters, making it essential for web development. Below is a list of commonly used functions in the url
package:
Function | Description |
---|---|
Golang url.Parse Function | Parses a URL string and returns a URL structure. |
Golang url.QueryEscape Function | Escapes a string so it can be safely placed in a URL query. |
Golang url.ParseRequestURI Function | Parses a URL and ensures it is a valid RequestURI. |
Golang url.QueryUnescape Function | Unescapes a URL query string. |
Golang url.PathEscape Function | Escapes a string for safe inclusion in a URL path segment. |
Golang url.PathUnescape Function | Unescapes a URL path string. |
Golang url.URL.String | Returns the string representation of a URL. |
Golang url.URL.Query | Returns the query parameters of a URL as a Values structure. |
Golang url.URL.ResolveReference | Resolves a reference URL against a base URL. |
Golang url.URL.Hostname | Returns the hostname of a URL. |
Golang url.URL.Port | Returns the port of a URL, if specified. |
Golang url.URL.IsAbs | Returns whether the URL is absolute. |
Golang url.URL.RequestURI | Returns the request URI of the URL. |
Golang url.URL.EscapedPath | Returns the escaped path of the URL. |
Golang url.User Function | Returns a Userinfo structure with a username set. |
Golang url.UserPassword Function | Returns a Userinfo structure with a username and password set. |
Golang url.Values.Encode | Encodes the values into a URL-encoded query string. |
Golang url.Values.Get | Gets the first value associated with the given key. |
Golang url.Values.Set | Sets the key to the given value, replacing any existing values. |
Golang url.Values.Add | Adds the value to the key, appending to any existing values. |
Golang url.URL.JoinPath | Joins path elements to the URL’s path. |
Golang url.Values.Has | Checks if the key exists in the values. |
Golang os Package Functions
The os
package in Go provides a platform-independent interface to operating system functionality, including file handling, process management, and environment variables. Here is a list of commonly used functions and methods in the os
package:
Function/Method | Description |
---|---|
Golang os.Chdir Function | Changes the current working directory to the specified path. |
Golang os.Chmod Function | Changes the mode (permissions) of a file. |
Golang os.Chown Function | Changes the owner and group IDs of a file. |
Golang os.Chtimes Function | Changes the access and modification times of a file. |
Golang os.DirFS Function | Returns a file system rooted at the specified directory. |
Golang os.Environ Function | Returns a copy of strings representing the environment variables. |
Golang os.Executable Function | Returns the path name for the executable that started the current process. |
Golang os.Exit Function | Exits the program with the specified status code. |
Golang os.Expand Function | Replaces ${var} or $var in a string based on the mapping function provided. |
Golang os.ExpandEnv Function | Replaces ${var} or $var in a string using the environment variables. |
Golang os.Getegid Function | Returns the effective group ID of the calling process. |
Golang os.Getenv Function | Retrieves the value of the environment variable named by the key. |
Golang os.Geteuid Function | Returns the effective user ID of the calling process. |
Golang os.Getgid Function | Returns the group ID of the calling process. |
Golang os.Getgroups Function | Returns a list of the group IDs of the calling process. |
Golang os.Getpagesize Function | Returns the underlying system’s memory page size. |
Golang os.Getpid Function | Returns the process ID of the calling process. |
Golang os.Getppid Function | Returns the parent process ID of the calling process. |
Golang os.Getuid Function | Returns the user ID of the calling process. |
Golang os.Getwd Function | Returns a rooted path name corresponding to the current working directory. |
Golang os.Hostname Function | Returns the host name reported by the kernel. |
Golang os.IsExist Function | Returns true if the error indicates that a file or directory already exists. |
Golang os.IsNotExist Function | Returns true if the error indicates that a file or directory does not exist. |
Golang os.IsPathSeparator Function | Returns true if the character is a directory separator. |
Golang os.IsPermission Function | Returns true if the error indicates a permission problem. |
Golang os.IsTimeout Function | Returns true if the error indicates a timeout. |
Golang os.LookupEnv Function | Retrieves the value of the environment variable named by the key, and returns whether the key was present. |
Golang os.Mkdir Function | Creates a new directory with the specified name and permission bits. |
Golang os.MkdirAll Function | Creates a directory named path, along with any necessary parents. |
Golang os.MkdirTemp Function | Creates a new temporary directory in the specified directory. |
Golang os.Pipe Function | Returns a connected pair of Files; reads from r return bytes written to w. |
Golang os.ReadFile Function | Reads the contents of the named file and returns it as a byte slice. |
Golang os.Remove Function | Removes the named file or directory. |
Golang os.RemoveAll Function | Removes the named file or directory and any children it contains. |
Golang os.Rename Function | Renames a file or directory. |
Golang os.SameFile Function | Reports whether two files describe the same file system entity. |
Golang os.TempDir Function | Returns the default directory to use for temporary files. |
Golang os.Truncate Function | Truncates a file to a specified length. |
Golang os.Unsetenv Function | Deletes the environment variable named by the key. |
Golang os.UserHomeDir Function | Returns the current user’s home directory. |
Golang os.WriteFile Function | Writes data to a file named by filename. |
Golang os.Create Function | Creates the named file with mode 0666 (before umask) and opens it for writing. |
Golang os.CreateTemp Function | Creates a new temporary file in the specified directory, opening it for reading and writing. |
Golang os.NewFile Function | Returns a new File for the given file descriptor. |
Golang os.Open Function | Opens the named file for reading. |
Golang os.OpenFile Function | Opens the named file with the specified flag and perm, if applicable. |
Golang os.File.Chdir | Changes the current working directory to the file. |
Golang os.File.Chmod | Changes the mode (permissions) of the file. |
Golang os.File.Chown | Changes the owner and group IDs of the file. |
Golang os.File.Close | Closes the file, rendering it unusable for I/O. |
Golang os.File.Fd | Returns the integer Unix file descriptor referencing the open file. |
Golang os.File.Name | Returns the name of the file as presented to Open . |
Golang os.File.Read | Reads up to len(b) bytes from the file. |
Golang os.File.ReadDir | Reads the contents of the directory associated with the file. |
Golang os.File.ReadFrom | Reads data from r until EOF and writes it to the file. |
Golang os.File.Stat | Returns a FileInfo describing the file. |
Golang os.File.Truncate | Truncates the file to a specified length. |
Golang os.File.Write | Writes len(b) bytes to the file. |
Golang os.File.WriteAt | Writes len(b) bytes to the file starting at byte offset off. |
Golang os.File.WriteString | Writes the contents of the string s to the file. |
Golang os.Stat Function | Returns a `FileInfo` describing the named file. |
Golang os.FindProcess Function | Finds the process with the given process ID, returning a `Process` struct. |
Golang os.StartProcess Function | Starts a new process with the given program name and arguments. |
Golang os.Process.Kill | Terminates the process by sending the `SIGKILL` signal. |
Golang JSON Package Functions
The encoding/json
package in Go provides functions for working with JSON data, including marshalling and unmarshalling of data structures. Here is a list of commonly used functions in the json
package:
Function | Description |
---|---|
Golang json.Marshal Function | Encodes a Go data structure into JSON format. |
Golang json.MarshalIndent Function | Encodes a Go data structure into JSON format with indentation for better readability. |
Golang json.Unmarshal Function | Decodes JSON data into a Go data structure. |
Golang json.NewDecoder Function | Creates a new JSON decoder that reads from an input stream. |
Golang json.NewEncoder Function | Creates a new JSON encoder that writes to an output stream. |
Golang json.Compact Function | Removes insignificant space characters from JSON data. |
Golang json.Indent Function | Formats JSON data with indentation for better readability. |
Golang json.Valid Function | Checks if a byte slice is valid JSON. |
Golang json.RawMessage Type | Represents a raw encoded JSON value to delay JSON decoding or precompute a JSON encoding. |
Golang Log Package Functions
The log
package in Go provides simple logging capabilities, including functions for printing, formatting, and writing log messages. Here is a list of commonly used functions in the log
package:
Function | Description |
---|---|
Golang log.Fatal Function | Logs a message and then calls os.Exit(1). |
Golang log.Fatalf Function | Formats a message according to a format specifier and logs it, then calls os.Exit(1). |
Golang log.Fatalln Function | Logs a message with a newline and then calls os.Exit(1). |
Golang log.Panic Function | Logs a message and then calls panic. |
Golang log.Panicf Function | Formats a message according to a format specifier and logs it, then calls panic. |
Golang log.Panicln Function | Logs a message with a newline and then calls panic. |
Golang log.Print Function | Logs a message. |
Golang log.Printf Function | Formats a message according to a format specifier and logs it. |
Golang log.Println Function | Logs a message with a newline. |
Golang log.SetPrefix Function | Sets the prefix for log messages. |
Golang log.SetOutput Function | Sets the output destination for log messages. |
Golang log.Writer Function | Returns the output destination for log messages. |
Golang log.Prefix Function | Returns the prefix for log messages. |
Golang log.Output Function | Logs a message to the specified output with a given number of stack frames to skip. |
Golang strconv Package Functions
The strconv
package in Go provides functions for converting between strings and other data types, such as integers and floating-point numbers. It also includes functions for quoting and unquoting string literals. Below is a list of commonly used functions in the strconv
package:
Function | Description |
---|---|
Golang strconv.AppendBool Function | Appends the string form of the boolean to the destination byte slice. |
Golang strconv.AppendFloat Function | Appends the string form of the floating-point number to the destination byte slice. |
Golang strconv.AppendInt Function | Appends the string form of the integer to the destination byte slice. |
Golang strconv.AppendUint Function | Appends the string form of the unsigned integer to the destination byte slice. |
Golang strconv.Atoi Function | Converts a string to an integer. |
Golang strconv.FormatBool Function | Returns the string representation of a boolean value. |
Golang strconv.FormatComplex Function | Returns the string representation of a complex number. |
Golang strconv.FormatFloat Function | Returns the string representation of a floating-point number. |
Golang strconv.FormatInt Function | Returns the string representation of an integer. |
Golang strconv.FormatUint Function | Returns the string representation of an unsigned integer. |
Golang strconv.ParseComplex Function | Parses a string as a complex number. |
Golang strconv.ParseFloat Function | Parses a string as a floating-point number. |
Golang strconv.ParseInt Function | Parses a string as an integer. |
Golang strconv.Itoa Function | Converts an integer to its string representation. |
Golang strconv.AppendQuote Function | Appends a double-quoted Go string literal representing s to dst and returns the extended buffer. |
Golang strconv.AppendQuoteRune Function | Appends a single-quoted Go character literal representing the rune to dst and returns the extended buffer. |
Golang strconv.Quote Function | Returns a double-quoted Go string literal representing s. |
Golang strconv.QuoteToASCII Function | Returns a double-quoted Go string literal representing s, safely escaped with ASCII only. |
Golang strconv.QuotedPrefix Function | Scans the beginning of s for a string literal prefix. The prefix may be single, double, or back quotes. |
Golang strconv.UnquoteChar Function | Unquotes a single character, reporting the character’s value and its size. |
Golang slices Package Functions
The slices
package in Go provides a variety of utility functions to work with slices. These functions include operations such as searching, sorting, comparing, and modifying slices. Below is a list of commonly used functions in the slices
package:
Function | Description |
---|---|
Golang slices.BinarySearch Function | Performs a binary search on a sorted slice and returns the position of the target element. |
Golang slices.BinarySearchFunc Function | Performs a binary search on a sorted slice using a custom comparison function. |
Golang slices.Clip Function | Returns a slice with the same elements as the original, but with a smaller capacity. |
Golang slices.Clone Function | Creates a copy of the slice with a new underlying array. |
Golang slices.Compact Function | Removes adjacent duplicates from a slice. |
Golang slices.CompactFunc Function | Removes adjacent duplicates from a slice using a custom comparison function. |
Golang slices.Compare Function | Compares two slices lexicographically. |
Golang slices.CompareFunc Function | Compares two slices lexicographically using a custom comparison function. |
Golang slices.Concat Function | Concatenates multiple slices into a single slice. |
Golang slices.ContainsFunc Function | Checks if any element in the slice satisfies the provided predicate function. |
Golang slices.Delete Function | Deletes elements from a slice between specified indices. |
Golang slices.DeleteFunc Function | Deletes elements from a slice that satisfy the provided predicate function. |
Golang slices.Equal Function | Checks if two slices are equal. |
Golang slices.EqualFunc Function | Checks if two slices are equal using a custom comparison function. |
Golang slices.Grow Function | Grows the capacity of the slice. |
Golang slices.Index Function | Finds the first index of the target element in the slice. |
Golang slices.IndexFunc Function | Finds the first index of an element in the slice that satisfies the provided predicate function. |
Golang slices.Insert Function | Inserts elements into the slice at the specified index. |
Golang slices.IsSorted Function | Checks if the slice is sorted. |
Golang slices.IsSortedFunc Function | Checks if the slice is sorted using a custom comparison function. |
Golang slices.Max Function | Finds the maximum value in the slice. |
Golang slices.MaxFunc Function | Finds the maximum value in the slice using a custom comparison function. |
Golang slices.Min Function | Finds the minimum value in the slice. |
Golang slices.MinFunc Function | Finds the minimum value in the slice using a custom comparison function. |
Golang slices.Replace Function | Replaces elements in a slice between specified indices with elements from another slice. |
Golang slices.Reverse Function | Reverses the elements of the slice. |
Golang slices.Sort Function | Sorts the elements of the slice. |
Golang slices.SortFunc Function | Sorts the elements of the slice using a custom comparison function. |
Golang slices.SortStableFunc Function | Sorts the elements of the slice using a custom comparison function, maintaining the order of equal elements. |
Golang sort Package Functions
The sort
package in Go provides a collection of functions for sorting and searching slices and arrays. These functions cover a variety of data types, including integers, floating-point numbers, and strings. Below is a list of commonly used functions in the sort
package:
Function | Description |
---|---|
Golang sort.Find Function | Finds an index of the first occurrence of an element in a sorted slice. |
Golang sort.Float64s Function | Sorts a slice of float64s in increasing order. |
Golang sort.Float64sAreSorted Function | Reports whether a slice of float64s is sorted in increasing order. |
Golang sort.Ints Function | Sorts a slice of ints in increasing order. |
Golang sort.IntsAreSorted Function | Reports whether a slice of ints is sorted in increasing order. |
Golang sort.IsSorted Function | Reports whether the data is sorted. |
Golang sort.Search Function | Searches for the index where a value should be inserted in a sorted slice. |
Golang sort.SearchFloat64s Function | Searches for a value in a sorted slice of float64s and returns its index. |
Golang sort.SearchInts Function | Searches for a value in a sorted slice of ints and returns its index. |
Golang sort.SearchStrings Function | Searches for a value in a sorted slice of strings and returns its index. |
Golang sort.Slice Function | Sorts a slice according to a provided comparison function. |
Golang sort.SliceIsSorted Function | Reports whether a slice is sorted according to a provided comparison function. |
Golang sort.Sort Function | Sorts data according to a provided interface. |
Golang sort.Strings Function | Sorts a slice of strings in increasing order. |
Golang unicode Package Functions
The unicode
package in Go offers a variety of functions to work with Unicode characters, providing tools to test, convert, and classify them. Below is a list of commonly used functions in the unicode
package:
Function | Description |
---|---|
Golang unicode.In Function | Checks if a character belongs to one or more ranges of Unicode code points. |
Golang unicode.Is Function | Determines if a character belongs to a specific Unicode property. |
Golang unicode.IsDigit Function | Reports whether the rune is a decimal digit. |
Golang unicode.IsLetter Function | Checks if a character is a letter. |
Golang unicode.IsLower Function | Determines if a character is a lowercase letter. |
Golang unicode.IsOneOf Function | Checks if a character belongs to one of a set of ranges. |
Golang unicode.IsPrint Function | Reports whether the rune is defined as printable. |
Golang unicode.IsPunct Function | Reports whether the rune is a Unicode punctuation character. |
Golang unicode.IsSpace Function | Checks if a character is a white space. |
Golang unicode.IsTitle Function | Determines if a character is a title case letter. |
Golang unicode.IsUpper Function | Reports whether the rune is an uppercase letter. |
Golang unicode.To Function | Maps the rune to another rune, typically for case conversion. |
Golang unicode.ToLower Function | Converts the rune to lowercase. |
Golang unicode.ToUpper Function | Converts the rune to uppercase. |
Golang regexp Package Functions
The regexp
package in Go provides support for regular expressions, enabling pattern matching in strings. Here is a list of commonly used functions in the regexp
package:
Function | Description |
---|---|
Golang regexp.Compile Function | Parses a regular expression and returns, if successful, a Regexp object that can be used to match against text. |
Golang regexp.CompilePOSIX Function | Compiles a regular expression in POSIX syntax and returns a Regexp object that can be used to match against text. |
Golang regexp.MustCompile Function | Compiles a regular expression, panicking if the expression is invalid. It returns a Regexp object that can be used to match against text. |
Golang regexp.Match Function | Matches a string against a regular expression pattern and returns a boolean indicating whether it matches. |
Golang regexp.MatchReader Function | Matches the text read from an io.Reader against a regular expression pattern and returns a boolean indicating whether it matches. |
Golang regexp.MatchReader Function | Matches the text read from an io.Reader against a regular expression pattern and returns a boolean indicating whether it matches. |
Golang regexp Package Functions
The regexp
package in Go provides support for regular expressions, enabling pattern matching in strings. Here is a list of commonly used functions in the regexp
package:
Function | Description |
---|---|
Golang regexp.Compile Function | Parses a regular expression and returns, if successful, a Regexp object that can be used to match against text. |
Golang regexp.CompilePOSIX Function | Compiles a regular expression in POSIX syntax and returns a Regexp object that can be used to match against text. |
Golang regexp.MustCompile Function | Compiles a regular expression, panicking if the expression is invalid. It returns a Regexp object that can be used to match against text. |
Golang regexp.Match Function | Matches a string against a regular expression pattern and returns a boolean indicating whether it matches. |
Golang regexp.MatchReader Function | Matches the text read from an io.Reader against a regular expression pattern and returns a boolean indicating whether it matches. |
Golang regexp.MatchReader Function | Matches the text read from an io.Reader against a regular expression pattern and returns a boolean indicating whether it matches. |
Golang filepath Package Functions
The filepath
package in Go provides utilities for manipulating filename paths in a way that is portable between operating systems. Below is a list of commonly used functions in the filepath
package:
Function | Description |
---|---|
Golang filepath.Abs Function | Returns an absolute representation of a given path. |
Golang filepath.Base Function | Returns the last element of a given path. |
Golang filepath.Clean Function | Returns the shortest path name equivalent to the given path by eliminating redundant elements. |
Golang filepath.Dir Function | Returns all but the last element of the given path, typically the path’s directory. |
Golang filepath.FromSlash Function | Converts forward slashes in a path to the system’s path separator. |
Golang filepath.Join Function | Joins any number of path elements into a single path, adding separators as necessary. |
Golang filepath.Rel Function | Computes a relative path that is equivalent to the target path when joined to the base path. |
Golang filepath.Split Function | Splits a path into a directory and file name component. |
Golang filepath.ToSlash Function | Converts the system’s path separator to forward slashes in a given path. |
Golang filepath.VolumeName Function | Returns the leading volume name of the given path, such as “C:” for Windows. |
Golang filepath.Glob Function | Returns the names of all files matching the given pattern. |
Golang filepath.Walk Function | Walks the file tree rooted at the specified directory, calling a function for each file or directory found. |
Golang filepath.WalkDir Function | Walks the file tree rooted at the specified directory, similar to Walk, but with an additional context. |
Golang filepath.SkipDir Function | Skips the remaining files in the current directory during a walk. |
Golang filepath.IsAbs Function | Reports whether the path is absolute. |
Golang reflect Package Functions
The reflect
package in Go is used for runtime reflection, allowing you to inspect and manipulate objects and types dynamically. Here is a list of commonly used functions in the reflect
package:
Function | Description |
---|---|
Golang reflect.TypeOf Function | Returns the reflection Type that represents the dynamic type of the interface. |
Golang reflect.ValueOf Function | Returns a new Value initialized to the concrete value stored in the interface. |
Golang reflect.Zero Function | Returns a Value representing the zero value for the specified type. |
Golang reflect.New Function | Returns a Value representing a pointer to a new zero value for the specified type. |
Golang reflect.MakeSlice Function | Creates a new slice value for the specified type, length, and capacity. |
Golang reflect.MakeMap Function | Creates a new map value for the specified type. |
Golang reflect.MakeChan Function | Creates a new channel value for the specified type and buffer size. |
Golang reflect.MakeFunc Function | Creates a new function value with the specified Type that executes the provided function implementation. |
Golang reflect.Indirect Function | Returns the value that a pointer or interface value points to. |
Golang reflect.DeepEqual Function | Compares two values deeply for equality. |
Golang reflect.ArrayOf Function | Returns the Type representing a fixed-size array of the specified length and element type. |
Golang reflect.ChanOf Function | Returns the Type representing a channel with the specified direction and element type. |
Golang reflect.InterfaceOf Function | Returns the Type representing an interface with the specified methods. |
Golang reflect.MapOf Function | Returns the Type representing a map with the specified key and element types. |
Golang reflect.PtrTo Function | Returns the Type representing a pointer to the specified type. |
Golang reflect.SliceOf Function | Returns the Type representing a slice with the specified element type. |
Golang reflect.StructOf Function | Returns the Type representing a struct with the specified fields. |