[Golang] Unmarshal UTF-16 XML
How to parse a UTF-16 XML file in Go.
read more »How to parse a UTF-16 XML file in Go.
read more »Remove last character of UTF-8 string via utf8.DecodeLastRuneInString in Go.
read more »Given a directory, remove all empty sub-directories in Go.
read more »Check if an environment variable exists using os.LookupEnv in Go.
read more »Create short pieces of templates using fmt.Sprintf in Go.
read more »Go solution to Distinct powers - Problem 29 - Project Euler.
read more »Read twice or multiple times from the same io.Reader in Go
read more »Given an URL, auto-detect and convert the encoding of the HTML document to UTF-8 if it is not UTF-8 encoded in Go.
read more »Given an URL, determine the encoding of the HTML document in Go using golang.org/x/net/html and golang.org/x/text packages.
read more »Reverse a string using for or range keyword in Go.
read more »Go solution to Number spiral diagonals - Problem 28 - Project Euler.
read more »Go solution to Names scores - Problem 22 - Project Euler.
read more »Go solution to Counting Sundays - Problem 19 - Project Euler.
read more »Go solution to Pandigital products - Problem 32 - Project Euler.
read more »Create new or custom error using fmt.Errorf or errors.New in Go.
read more »Given a string with Chinese characters, convert the Chinese characters in the string to Pinyin (romanization system for Chinese) in Go.
read more »Given a rune value, check if the rune is a Chinese character.
read more »Download and save files (image, pdf, etc.) from given URL in Go.
read more »Use Go regexp package to repace spaces and newline in the string.
read more »Read non-utf8 webpage with goquery if the charset of the page is known.
read more »Go solution to Coin sums - Problem 31 - Project Euler.
read more »Extract plain text from PDF via github.com/ledongthuc/pdf package.
read more »Convert int or int64 to string in Go via fmt.Sprintf.
read more »Use anonymous function in Go defer statement.
read more »Use Go defer statement to elegantly wait for all goroutines to finish.
read more »Unmarshal JSON data in which the field name is determined at runtime in Go.
read more »Calculate politeness of a number in Go, i.e., the number of ways it can be expressed as the sum of consecutive integers
read more »Delete all files with zero size in a directory in Go. Sub-directories included.
read more »Get all links of story highlights of a specific Instagram user in Go. Use only Go standard library and no third-party packages needed.
read more »Go solution to Digit fifth powers - Problem 30 - Project Euler.
read more »Embed read-only files in Go code.
read more »Go solution to Project Euler.
read more »Go solution to Quadratic primes - Problem 27 - Project Euler.
read more »Programatically send mails using Gmail.
read more »Get last modified file, name of which starts with specific prefix, in Go.
read more »Remove duplicates from slice or array in Go.
read more »Given user name, get Instagram user information, such as id, username, biography, etc., in Go.
read more »Find oldest modified file in the directory, excluding sub-directories, in Go.
read more »Sort a list of words alphabetically in Go.
read more »Write a list of strings to file in Go programming language.
read more »Compare if the size of two files is the same in Go.
read more »Find files after a given timestamp in Go.
read more »Get last modified file before a specific time in Go.
read more »Get last Ubuntu Linux system boot/restart time in Go.
read more »Terminal UI - List items in directory via Go termui package.
read more »Split a folder with many files into multiple sub-folders in Go.
read more »Make slice empty in Go programming language.
read more »The uploaded name of photos/video of gphotosuploader includes full file path. Remove the directory path and leave only file name.
read more »List folder size in ascending orfer, excluding sub-folders, in Go.
read more »Move file to another folder via Go os.Rename method.
read more »Find files modified more than one day via Go standard time package.
read more »Calcualte total size of files in folder, excluding sub-folders in Go.
read more »Check if a program (or command), such as wget or ffmpeg, is available in Go.
read more »Find set differecne of two arrays, i.e., the elements in one array but not in the other, in Go.
read more »Find the set of all elements in two arrays in Go programming language.
read more »Find common elements (matches, intersection) of two arrays in Go programming language.
read more »Print HTTP response header via Go standard net/http package.
read more »Get urls of video and audio of Instagram user post live videos shared to stories via Go standard regexp package.
read more »Use Go standard os/exec package to run wget via shell command.
read more »Send HTTP request with cookies via Go standard net/http package.
read more »Go solution to Lexicographic permutations - Problem 24 - Project Euler.
read more »Disable caching in Go test.
read more »HTTP request with custom User-Agent header via Go standard net/http package.
read more »Get file name without extension in Go programming language.
read more »Embed file in QR code via Go programming language.
read more »Trick to get Instagram post live video items.
read more »Access Instagram API to discover Top lives in Go programming language. Use only Go standard library and no third-party packages needed.
read more »Instagram web top search client in Go programming language. Use only Go standard library and no third-party packages needed.
read more »Sort files by size in Go. Use sort.Slice on the slice of os.FileInfo returned by ioutil.ReadDir.
read more »Get URL of photos and videos in Instagram post via Go programming language. Use only Go standard library and no third-party packages needed.
read more »Get URL of all posts of a specific Instagram user via Go programming language. Use only Go standard library and no third-party packages needed.
read more »Get Instagram following and followers of a specific user via Go programming language. Use only Go standard library and no third-party packages needed.
read more »Get links of Instagram highlight stories of a specific user via Go programming language. Use only Go standard library and no third-party packages needed.
read more »Get links of Instagram stories of a specific user via Go programming language. Use only Go standard library and no third-party packages needed.
read more »Caveat: Passing reference/pointer to goroutine function while range slice in Go.
read more »Get the list of following Instagram stories via Go programming language. Use only Go standard library and no third-party packages needed.
read more »Given user name, get Instagram user id via Go programming language. Use only Go standard library and no third-party packages needed.
read more »Go strings.Index is equivalent to JavaScript String.prototype.indexOf()
read more »Get domain name from URL via Go standard net/url package.
read more »Calculate the length of string (UTF-8) in Go. Iterate over the UTF-8 string by for or range keyword.
read more »Go solution to Non-abundant sums - Problem 23 - Project Euler.
read more »Fetch a public post on Blogger and extract data via goquery.
read more »Remove HTML inline style, i.e., remove style attribute from HTML node via Go net/html package.
read more »Go solution to Number letter counts - Problem 17 - Project Euler.
read more »Spell numbers from 1 to 1000 in English via Go programming language.
read more »Go solution to 1000-digit Fibonacci number - Problem 25 - Project Euler.
read more »Go solution to Factorial digit sum - Problem 20 - Project Euler.
read more »Multiplication of big natural numbers in Go. This is for very large positive integers which overflows the built-in numerical type in Go.
read more »Go solution to Power digit sum - Problem 16 - Project Euler.
read more »Go solution to Lattice paths - Problem 15 - Project Euler.
read more »Go solution to Large sum - Problem 13 - Project Euler.
read more »Addition of big natural numbers in Go. This is for very large positive integers which overflows the built-in numerical type in Go.
read more »Go solution to Largest product in a grid - Problem 11 - Project Euler.
read more »Given a string of 20x20 grid, convert the string to two dimensional slice in Go.
read more »Go solution to Even Fibonacci numbers - Problem 2 - Project Euler.
read more »Go solution to Multiples of 3 and 5 - Problem 1 - Project Euler.
read more »Given a natural number (integer), calculate the number of divisors of it in Go programming language.
read more »Go solution to highly divisible triangular number - Problem 12 - Project Euler.
read more »Go solution to largest product in a series - Problem 8 - Project Euler.
read more »Go solution to sum square difference - Problem 6 - Project Euler.
read more »Go solution to longest Collatz sequence - Problem 14 - Project Euler.
read more »Go solution to summation of primes - Problem 10 - Project Euler.
read more »Go solution to 10001st prime - Problem 7 - Project Euler.
read more »Check if an item is in slice or array in Go programming language.
read more »Goldbach's conjecture - Every even integer greater than 2 can be written as the sum of two primes. Given a positive even integer, write a Go program to find the two primes.
read more »Check if a string exists in file via Go regexp package.
read more »Euler's totient function implementation in Go programming language.
read more »Find least common multiple (LCM) by greatest common divisor (GCD) via Go programming language.
read more »Go solution to smallest multiple - Problem 9 - Project Euler.
read more »Go solution to special Pythagorean triplet - Problem 9 - Project Euler.
read more »Go solution to amicable numbers - Problem 21 - Project Euler.
read more »Integer exponentiation in Go programming language.
read more »Calculate the sum of all proper divisors (factors) of an integer number in Go programming language.
read more »Go solution to largest prime factor of 600851475143 - Problem 3 - Project Euler.
read more »Compute the greatest common divisor (GCD) via Euclidean algorithm in Go programming language.
read more »Prime Factorization - Find all prime factors of a given integer number in Go programming language.
read more »Check whether two strings are anagram of each other by characters count in Go programming language.
read more »Sort a string by character, i.e., convert the string to []rune and then sort the slice of runes in Go programming language.
read more »Check whether two strings are anagram of each other by sorting in Go programming language.
read more »My answer to How can I get Chinese first letter(Pinyin) by using Go language? - Stack Overflow
read more »Compute the length of longest common subsequence via recursion in Go.
read more »Web scraping JavaScript rendered webpages by Chrome Debugging Protocol . Write Go code to programmatically login Facebook and then take screenshot.
read more »My implementation of atoi function, which converts a string representing decimal number to its corresponding int type, in Go programmming language.
read more »Pass command line arguments (flags) in Go test.
read more »Embed any type of file in string literal in Go code.
read more »Test how filename globbing works in Go standard library.
read more »Go solution to largest palindrome made from the product of two 3-digit numbers. - Problem 4 - Project Euler.
read more »Go implementation of primality test - optimized school method.
read more »Go implementation of Sieve of Eratosthenes.
read more »Check if an integer number is palindrome in Go programming language.
read more »Go type conversion (type casting) between string and integer number.
read more »Go type conversion (type casting) between string and floating number.
read more »Get the attribute of a HTML element via named group matches in Go regexp package.
read more »Given a text and a wildcard pattern, implement wildcard pattern matching algorithm that finds if wildcard pattern is matched with text in Go programming language.
read more »Go implementation of BK-tree data structure used for approximate string matching in a dictionary. The distance metric here is Levenshtein distance, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.
read more »Go implementation of Wagner-Fischer algorithm that computes the edit distance between two strings of characters. The edit distance here is Levenshtein distance, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.
read more »Recursive implementation of Levenshtein distance algorithm in Go programming language. Levenshtein distance (LD) is a measure of the similarity between two strings, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.
read more »Example of Go enumerated constants using iota enumerator, and print the string representation of enum name.
read more »Create a directory if it does not exist. Otherwise do nothing.
read more »Check if a file, directory, or symbolic link exists, or not exists, in Go programming language.
read more »Demonstrate the usage of your methods by writing example code in the testing of your package in Go programming language.
read more »Get query string of URL in request handler of HTTP server via Go standard net/http Package.
read more »How to seed the pseudorandom number generator (PRNG) properly in Go programming language.
read more »Enable cross-domain XHR requests in Go server via Go standard net/http package.
read more »Implement static file server with custom HTTP 404 Not Found handler via Go standard net/http package.
read more »A Go server that returns HTTP request headers via JSONP.
read more »Go equivalent of Python string startswith and endswith methods.
read more »Pass slice or array as variadic (...) parameter in Go programming language.
read more »Variadic Function Example in Go - Implement addEventListener method via GopherJS.
read more »Find all permutations of a given string containing all distinct characters in Go programming language.
read more »Do not use fmt.Fprintf to write to file
read more »Web scraping - fetch HTML DOM Style Object properties via goquery in Go programming language.
read more »Extract template data from human readable YAML file and create textual output in Go.
read more »Bug in Go 1.8 text/template and html/template package
read more »gojianfan - converter for Traditional and Simplified Chinese in Go programming language.
read more »Convert the kebab-case to camelCase in Go programming language.
read more »Fetch and parse a public post on Facebook and extract data via goquery in Go programming language.
read more »Parse the string of Unix time (also known as POSIX time or Epoch time) in Go programmming language.
read more »Implement querySelector in goquery
read more »Complement to Go text/template and html/template package - Parse all files in directory (including sub-directories).
read more »Add method (function) to an existing type in external package in Go programming language.
read more »Get string from io.Writer (io writer) in Go programming language.
read more »Template inheritance via Go html/template package. Show how one tempalate extends from another, and also include templates, just as how we do by Python Jinja2.
read more »Read lines from web URL via Go programming language.
read more »Initialize 2-dimensional array/slice in Go programming language.
read more »Insert a line or string to n-th line of the file via Go programming language.
read more »Append text line or string to the end of file via Go programming language.
read more »Remove leading and trailing empty strings in string array/slice via Go programming language.
read more »Test if a string consists of single character or letter in Go programming language.
read more »Read an image from web and resize it in Go programming language.
read more »Remove prefix or suffix from string via Go programming language.
read more »Fail to build OpenCC Go binding on Ubuntu Linux 16.10, and how I fix it.
read more »How to parse command-line arguments (string variable) via flag package in Go programming language.
read more »Find Pāli word in Velthuis scheme, and replace them with unicode via Go programming language.
read more »Find redundant files saved by Chrome browser via Go.
read more »Iterate over all DOM nodes/elements via goquery in Go programming language.
read more »Guess metadata from HTML webpage and convert it to reStructuredText format.
read more »Convert HTML to restructuredtext format via net/html package in Go programming language. (Not fully supported)
read more »Get HTML title via net/html package in Go programming language.
read more »Convert HTML unordered (bulleted) list, HTML link, and HTML image to restructuredtext format via net/html package in Go programming language.
read more »Convert HTML unordered (bulleted) list and HTML link to restructuredtext format via net/html package in Go programming language.
read more »Convert HTML unordered (bulleted) list to restructuredtext format via goquery in Go programming language.
read more »Replace HTML links node with text node of restructuredtext format in a webpage via goquery in Go programming language.
read more »Wrap Pāli words in span element via regular expression and Go.
read more »Get the number of children nodes via goquery in Go.
read more »Output fixed width/length string in Go programming language.
read more »Read Yes/No (i.e., ask for user confirmation) from console in Go programming language.
read more »Create reStructuredText metadata via Go text/template and text/width package.
read more »Get the number of child nodes via Go net/html package.
read more »Get Vine video src URL via goquery in Go programming language. My answer to Stack Overflow question: Getting blank return when using GoQuery to get video src
read more »Scape JavaScript code to get campaign number via Go strings package.
read more »Answer to Stack Overflow question: go - How to get simple text from HTML page with goquery?.
read more »Equivalent of JavaScript getElementById via Go net/html package.
read more »Convert HTML table to reStructuredText list-table via goquery in Go programming language.
read more »Convert HTML table to reStructuredText list-table via Go net/html package. This is experimental and not robust implementation.
read more »Convert all HTML links to restructuredtext in a webpage via goquery in Go programming language.
read more »Extract text (i.e., footnote) in HTML via state machine and goquery in Go programming language.
read more »Iterate over all DOM elements in HTML via Go programming language. Use net/html package to parse and iterate all elements in HTML. Search for HTML links and output them in reStructuredText format.
read more »Readlines from string or file in Go programming language.
read more »Extract title and URL from Hacker News comment via goquery, and then output the info to reStructuredText footnote.
read more »Extract title, image, and URL in buy123 product webpage via goquery, and then output the info to reStructuredText image.
read more »Server get HTML form value from HTTP POST in Go programming language.
read more »Remove query string from URL in Go programming language.
read more »Get UTF-8 string width (width of English letter is 1, width of CJK character is 2) in Go programming language.
read more »A simple example to read HTML title via goquery in Go.
read more »Convert file encoding from Big5 to UTF-8 via Go programming language.
read more »Download and save HTML file from given URL via Go. Do nothing if the HTML file already locally exists.
read more »Find Pāli word in Velthuis scheme via Go programming language.
read more »Read JPEG image date from Exif metadata in Go programming language.
read more »Minify HTML via Go programming language.
read more »Minify CSS via Go programming language.
read more »Remove C/C++ style comments via Go programming language.
read more »Concatenate and compress JavaScript files via Go programming language and online Google Closure Compiler.
read more »Concatenate JavaScript files via Go programming language.
read more »Automatically convert Traditional Chinese (zh_TW) PO file to Simplified Chinese (zh_CN) by OpenCC and Go programming language.
read more »Example for block action in Go text/template and html/template packages.
read more »Go regexp example of named group matches - extract metadata from file path.
read more »Tiny Go embedding code example of analogy to StringList implementation of reStructuredText.
read more »Call a function (method), with multiple arguments and returns, of a struct by name during run-time in Go. (run-time reflection)
read more »Call a function (method) of a struct by name during run-time in Go. (run-time reflection)
read more »Synonyms - Python class translated to Go
read more »Go implemantation of succinct trie ported from Bits.js.
read more »Count leading spaces of a string in Go.
read more »List all files in a directory in Go. Similar to Python os.walk.
read more »Iterate over UTF-8 or non-ASCII strings in Go. Iterations by for or range keywords.
read more »Save variables of any type (struct, map, array, slice, etc.) in JSON format file via Go programming language.
read more »Pretty print variable (struct, map, array, slice) in Go.
read more »Write a Go program to compile your SASS/SCSS (CSS extension language) files to CSS via libsass and Go wrapper for libsass.
read more »Convert PO files to JSON format via Go. The data of JSON format can be passed to front-end by web servers to translate a text string into the user's native language. You can use the JSON data to implement gettext function in browsers.
read more »Packages of reStructuredText (to HTML) implementation in Go.
read more »Use xgettext (one of GNU gettext utilities) to extract translatable strings from HTML templates of Go html/template.
read more »i18n (Internationalization) Go web applications by GNU gettext tools and html/template. Use PO and MO files generated by gettext in Golang web application to render HTML of specific languages by html/template.
read more »Use SQLite in Go program. Write a Golang program to initialize a database, create a table, write some data to the table and read data from the table.
read more »Conversion of Traditional and Simplified Chinese by OpenCC and Go programming language.
read more »Generate a random string from [a-z0-9] in Golang.
read more »Save JSON-format data in the directory using Go programming language.
read more »Use channels to wait for all goroutines to finish
read more »Comparison of Python Jinja2 and Go html/template, side by side for easy reference - Go template custom function vs Jinja2 custom filter and function.
read more »Run cleanup function when receiving ^C signal.
read more »Poll RSS/ATOM feeds with Goroutines
read more »Comparison of Python Jinja2 and Go html/template, side by side for easy reference - Mimic Jinja2 template inheritance in Go html/template
read more »Comparison of Python Jinja2 and Go html/template, side by side for easy reference - Loop through Python Dictionaries vs Go Maps
read more »Comparison of Python Jinja2 and Go html/template, side by side for easy reference - Python List vs Go Arrays and Slices - Loop Index
read more »Comparison of Python Jinja2 and Go html/template, side by side for easy reference - Python List vs Go Arrays and Slices
read more »Parse Atom 1.0/RSS 2.0 web feeds in Go programming language.
read more »Convert Atom 1.0 to RSS 2.0 format in Go programming language.
read more »How to read XML/HTML files in Go programming language (for newbie) - Parse Atom 1.0 format.
read more »How to read XML/HTML files in Go programming language (for newbie) - Parse RSS 2.0 format.
read more »How to read XML/HTML files in Go programming language (for newbie) - Parse OPML format concisely.
read more »How to read XML/HTML files in Go programming language (for newbie) - Parse OPML format.
read more »Comparison of Python Jinja2 and Go html/template, side by side for easy reference - print Hello World! on screen
read more »How to read XML/HTML files in Go programming language (for newbie) - Read multiple direct child elements.
read more »Parse Accept-Language in HTTP Request Header in Go Programming Language.
read more »Comparison of Python Jinja2 and Go html/template, side by side for easy reference - Load and Serve Templates
read more »How to read XML/HTML files in Go programming language (for newbie) - Read a direct child element.
read more »How to read XML/HTML files in Go programming language (for newbie) - Read element attribute.
read more »How to pass command-line arguments (flags) in Go programming language.
read more »How to read XML/HTML files in Go programming language (for newbie) - Read element and its content.
read more »Show how to pass JSON-format data using HTTP POST between browser (implemented with Dart) and web server (implemented with Go).
read more »