appsec.fyi

A somewhat curated list of links to various topics in application security.

Golang

LinkExcerptWord Count
Go Data Structures: InterfacesGo's interfaces—static, checked at compile time, dynamic when asked for—are, for me, the most exciting part of Go from a language design point of view. If I could export one feature of Go into other languages, it would be interfaces.2286
The Laws of ReflectionReflection in computing is the ability of a program to examine its own structure, particularly through types; it’s a form of metaprogramming. It’s also a great source of confusion. In this article we attempt to clarify things by explaining how reflection works in Go.2842
Strings, bytes, runes and characters in GoThe previous blog post explained how slices work in Go, using a number of examples to illustrate the mechanism behind their implementation. Building on that background, this post discusses strings in Go.2237
A curated list of awesome Go frameworks, libraries and softwareWe use the Golang Bridge community Slack for instant communication, follow the form here to join. Awesome Go has no monthly fee, but we have employees who work hard to keep it running.17657
ConstantsGo is a statically typed language that does not permit operations that mix numeric types. You can’t add a float64 to an int, or even an int32 to an int. Yet it is legal to write 1e6*time.Second or math.Exp(1) or even 1<<(' '+2.0).3631
Build a Web Crawler in GoOne of the basic tests I use to try out a new programming language is building a web crawler.3059
50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang DevsGo is a simple and fun language, but, like any other language, it has a few gotchas... Many of those gotchas are not entirely Go's fault. Some of these mistakes are natural traps if you are coming from another language. Others are due to faulty assumptions and missing details.11959
Packet Capture, Injection, and Analysis with GopacketUPDATE: My book, Security with Go, is now published. If you found this page helpful you should check out the book. It contains 14 chapters with various red and blue team topics covered. The gopacket package provides a Go wrapper for libpcap written in C.2782
google/gopsgops is a command to list and diagnose Go processes currently running on your system.$ gops 983 980 uplink-soecks go1.9 /usr/local/bin/uplink-soecks 52697 52695 gops go1.10 /Users/jbd/bin/gops 4132 4130 foops * go1.9 /Users/jbd/bin/foops 51130 51128 gocode go1.9.770
gliderlabs/sshThe Glider Labs SSH server package is dope. —@bradfitz, Go team member This package was built by @progrium after working on nearly a dozen projects at Glider Labs using SSH and collaborating with @shazow (known for ssh-chat).181
asciimoo/wuzzInteractive cli tool for HTTP inspection. Note: golang >= 1.10 required.147
"go get" command · golang-101-hacks"go get" command "go get" command is the standard way of downloading and installing packages and related dependencies, and let's check the particulars of it through an example: (1) Create a playstack repository in github; (2) There is a LICENSE file and play directory in playstack folder; (3) The pl776
A Foray Into Go Assembly Programming · Scott MansfieldThis blog post started last August when I was integrating the Spectator PercentileTimer concept into the metrics library in Rend so we could get better cross-fleet latency percentiles.2349
emluque/golang-internals-resourcesThis is a curated collection of Articles and Videos about Golang internals. It is intended for advanced/intermediate programmers who are new to Golang and want to understand what happens under the hood. Feel free to add to it! How does the golang scheduler work? by Ian Lance Taylor380
schollz/progressbarA very simple thread-safe progress bar which should work on every OS without problems. I needed a progressbar for croc and everything I tried had problems, so I made another one. In order to be OS agnostic I do not plan to support multi-line outputs. The progressbar implements an io.336
6 Tips for Using Strings in GoIf you are coming to Go from another language like Ruby or Python there are a lot of changes to take in, and many of these revolve around the string type. Below is a list of some quick tips that answered questions I had during my first few weeks using Golang.1784
teh-cmc/go-internalsClick here for the GitBook version. All kinds of contributions are very much welcome.230
A Go web development eco-system, designed to make your life easier.If you’re familiar with Rake tasks from Ruby, you’ll be right at home using Grift. Seeding a database, running a cleaning job are now at hand! Running background tasks are easy too, using the Background Workers.318
urlThe Host field contains the host and port subcomponents of the URL. When the port is present, it is separated from the host with a colon. When the host is an IPv6 address, it must be enclosed in square brackets: "[fe80::1]:80". The net.826
Anatomy of methods in GoEven Go does not provide classes, we can use structures to create objects as we have learned in the previous tutorial. But in OOP, classes have properties (fields) as well as behaviors (methods) and so far we have only learned about properties of a struct that are structure fields.206
Achieving concurrency in GoIn computer programming, concurrency is ability of a computer to deal with multiple things at once. For general example, if you are surfing internet in a browser, there might be lot of things happening at once.215
tdewolff/canvasCanvas is a common vector drawing target that can output SVG, PDF, EPS, raster images (PNG, JPG, GIF, ...), HTML Canvas through WASM, OpenGL, and Gio. It has a wide range of path manipulation functionality such as flattening, stroking and dashing implemented.1272
Go: FinalizersGo runtime provides a method runtime.SetFinalizer that allows developers to attach a function to a variable that will be called when the garbage collector sees this variable as garbage ready to be collected since it became unreachable.180
Go interfaces, the tricky partsDoes this Go snippet compile, and if not, why? It doesn't compile (playground). Surprisingly, although User implements Named, and the getName call is fine, the getNames(users) call is a type error.1271
bluesentinelsec/OffensiveGoLangOffensive GoLang is is a collection of Go packages containing commonly used cyber adversary emulation functions. Offensive GoLang accomplishes nothing by itself; rather, it is intended to support rapid red team tool development by providing common functions in a modular format.197
Interactive Go ChallengesHi, I’m Elliot the curator of these Go programming challenges! These interactive Go challenges have been designed so that they can help familiarize you with the fundamental Go syntax and also help to introduce some Computer Science and Math topics.77
go101/go101Go 101 is a series of books on Go programming. Currently, the following books are avaliable: These books are expected to help gophers gain a deep and thorough understanding of Go and be helpful for both beginner and experienced Go programmers.329
Building a BitTorrent client from the ground up in GoThis post is also available in Russian, Korean, and Chinese. BitTorrent is a protocol for downloading and distributing files across the Internet.3811
Metaprogram in GoMost modern sites implement some kind of MV* framework, either formally or loosely. If you code a lot, you are likely writing many models (M) over and over, that are mostly similar in structure and only vary in the details of the schema.237
How to learn internals of the Go Programming Language? [closed]Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago.1006
Page Not Found 😕It seems that the page you've requested does not exist.11
Go Slices: usage and internalsGo’s slice type provides a convenient and efficient means of working with sequences of typed data. Slices are analogous to arrays in other languages, but have some unusual properties. This article will look at what slices are and how they are used.1674
Digging deeper into the analysis of Go-codeThe analysis of source code at the syntactic level can help you with your coding in a variety of ways. For that, the text is almost always converted to AST first to make it easier to handle in most languages.1158
Diving into Go by building a CLI application0
Robust gRPC communication on Google Cloud Run (but not only!)0
Writing an API using GolangI am extremely new to Golang and I have been using a Udemy course to learn about the language. I am starting a new job as a back-end developer and my71
Go RabbitMQ Beginners Tutorial0
HTTP Adaptive Streaming video player written in golangWe've created a headless video player and a testbed framework for the evaluation of HTTP Adaptive Streaming (HAS) algorithms, protocols and so much mo57
Can someone help me understand Go Get?I started learning go(which I really like). Im reading the book "The Go Programming Language" which is the K&amp;R of Go but the book is really hard t40
Writing a basic API mask using Go and GraphQLThis is a short tutorial on how to write an API mask in Go, that uses Graphql to go out and make multiple calls to other APIs. Repo: https://github.com/irateswami/goGraphQL Json to Go struct: https://mholt.github.io/json-to-go/0
How to Write a Lexer in GoA lexer, which is also sometimes referred to as a scanner, reads a source program and converts the input into what is known as a token stream. This is a very important step in compilation since these tokens are used by the parser to create an AST (Abstract Syntax Tree).1416
Source code for progapanda.org: a severely over-engineered backend developer's personal website built with tview and websockets [issue help wanted!]0
maximthomas/gortasGortas (Golang Authentication Service) is a flexible API based authentication service, allows adding authentication to your site or service with minimum effort. Gortas supports multiple authentication methods across various data sources.387
Big File Uploader :- Upload big file by chunking the file using goroutines and channelHi community, I have been learning golang for some time after office hours. I love the language. I have written a simple file uploader which writes t50
Phil Wadler: Featherweight Go - YouTube0
How to Write a CLI With “Just Enough” Architecture0
How do you browse large GO codebaseSo I am reading Kubernetes codebase. It is so large. Are there any tools to which can help me how functions interact with each other and what is the c81
Basic Go GitHub repository template.Hello, I have made a lot of changes in [https://github.com/golang-templates/seed](https://github.com/golang-templates/seed) based on feedback from h163
An intro to Go for non-Go developersSummary: I’ve presented an introduction to Go a few times for developers who are new to the language – this is that talk serialized as a technical article. It looks at why you might want to use Go, and gives a brief overview of the standard library and the language itself.3150
Implementing Stack in GoIn computer science, a stack is an abstract data type that serves a collection of elements that are inserted and removed according to the LIFO (last-in, first-out) principle. Which means the last element you put in the stack is the first you take out.827
Exploring container package in Go (list, ring and heap)0
How To Code in Go eBookWorking on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.16
Unexpected Golang behaviorsThis small site is oriented to developers learning golang that want to see the unexpected, at least for a newcomer, behaviors in the language. This examples expect that reader is familiar with the language, if you’re not familiar with it, you should complete the Go by Example tutorial.127
Just found that golang has a gopher design guide.0
How to handle signals with Go to graceful shutdown HTTP serverIn this article we are going to learn how to handle os incoming signals for performing graceful shutdown of http server. To do so we are going to take advantage of os/signal package. Signals are primarily used on Unix-like systems.1004
A Concise Guide to the Latest Go Generics Draft DesignRecently, the Go team announced an updated draft design for their Generics in Go proposal. It goes into a lot of details about why certain decisions were made, implementation details, etc.516
local-interfacesDon't even look at the code yet. Read this first. You're going to look at the code in a very specific order with very specific things in mind, so don't cheat! It's not uncommon to see the desire for a "interface package" or shareable interfaces of some sort.1280
Bitcoin HD Wallet with Golang and gRPC (Part l)In this tutorial series, we are going to learn how to create an HD bitcoin wallet using Golang. The idea of the tutorial series is not only showing how to create the Wallet and getting balances but also how to implement a grpc server and a CLI tool and a web-app for consuming it.229
Context in Golang!Applications in golang use Contexts for controlling and managing very important aspects of reliable applications, such as cancellation and data sharing in concurrent programming. This may sound trivial but in reality, it’s not that so.226
Go: Multiple Errors ManagementError management in Go is always prone to debate and a recurrent topic in the annual survey about the biggest challenges developers are facing when using Go.175
pterm/ptermTo make PTerm available in your project, you can run the following command. Make sure to run this command inside your project, when you're using go modules 😉9817
How to setup Golang with VSCodeI have used Golang some years ago, but unfortunately I hadn't tried to do it in a long time and had forgotten all about it.... So I set it up from the beginning with a fresh mind.😊 The environment I used is as follows. macOS Catalina 10.15.5 Visual Studio Code 1.46.217
Go: The Idea Behind Sync.PoolI have, recently, encountered a problem in the Go Garbage Collection inside a project of mine. A massive amount of objects were allocated repeatedly and caused a huge workload of GC. Using sync.Pool I was able to decrease the allocations and GC workload. One of the highlights of the Go 1.227
hack-pad/hackpadHackpad is a Go development environment with the essentials to write and run code entirely within the browser, using the power of WebAssembly (Wasm). Want to discuss an idea or a bug? Open up a new issue and we can talk about it. Pull requests are welcome.81
Different ways to send an email with GolangIn this blog, we’ll look at different methods to send an email with Go, First, we will explore inbuilt smtp package, then we will move to use a popular package Gomail and finally, we will send HTML emails using custom templates. smtp is an inbuilt package provided with Golang.608
20 Go Packages You Can Use in Your Next ProjectGo is an amazing language that you can use to build almost any kind of program. Developed in 2007, it has the ease of an interpreted language while also being fast and efficient as a compiled language. It was also built thinking about concurrency and getting advantage of the multicore machines.179
projectdiscovery/proxifySwiss Army Knife Proxy for rapid deployments. Supports multiple operations such as request/response dump, filtering and manipulation via DSL language, upstream HTTP/Socks5 proxy.1379
Creating a web crawler in Go with CollyWeb scraping is a technique that lets you inspect, parse, and extract data from websites that would have otherwise been difficult to access due to the lack of a dedicated API.1561
GopherCon 2020: Jaana Dogan - Debugging Code Generation in GoHave you ever tried to understand how the Go toolchain takes your source code and generates a binary? Have you ever wondered how you can inspect machine code generated from Go source code? Or, have you ever optimized some Go code to later realize Go compiler is already doing the same optimization au0
Why Interface, and when.Coming from a C background, I did not understand the importance of interfaces at first, but as it turns out, in some way, interfaces can make object oriented programming a lot easier.579
sync.WaitGroupThe short answer is that is a bit clearer when we don’t care about the data being returned from the goroutine. It signifies to other developers that we just want to wait for a group of goroutines to complete, whereas a channel communicates that we are interested in results from those goroutines.168
A Proposal for Adding Generics to GoWe’ve filed a Go language change proposal to add support for type parameters for types and functions, permitting a form of generic programming. Generics can give us powerful building blocks that let us share code and build programs more easily.509
REST APIs using go-swagger, Lambda functions, and the API GatewayAWS provides support for Swagger/OpenAPI defined REST APIs as well as a go runtime; however, it is not entirely clear how best to work with these, especially if you’re used to using go-swagger for go REST APIs in a non-AWS context.1023
Top 3 Resources For Learning GoLangThis article explores the process of learning the Go programming language. Earthly significantly enhances Go development with its parallel build capabilities. Check it out. If I were a system administrator looking to learn a new programming language it would be Go.1319
But how, exactly, databases use mmap?In a previous post Discovering and exploring mmap using Go, we talked about how databases have a major problem to solve, which is: how to deal with data stored in disk that is bigger than the available memory.2040
The Top 10 Most Common Mistakes I’ve Seen in Go ProjectsFollowing the success of this post, I had in mind that such information could be a good fit for the book. Hence, here‘s my future book: 100 Go Mistakes. It will be published in 2022 but is already available as a MEAP (Manning Early Access Program):2454
Tools for implementing a Golang API server with auto-generated code and documentation, grpc-gatewayOpenAPI is a formalized specification and a complete framework for describing, creating, using, and visualizing REST web services. The goal is to allow client systems and documentation to synchronize their updates with changes on the server.3790
A New, Simpler Way to Do Dependency Injection in GoDependency injection (DI) is a great thing. Even if you haven’t heard of the term, it’s likely that you have already used it. This article assumes zero existing knowledge of DI. However, a basic understanding of Go.192
Naming Conventions in Go: Short but DescriptiveThat’s not a funny joke. Writing is easy, but reading is painful. Do you ever find yourself wondering what a certain variable refers to or what the purpose of a certain package is? Well, that’s why we need rules and conventions.194
I Mastered Golang Basics by Solving These 15 Project Euler ProblemsHello. In this article, I would like to show you my learnings while solving the first 15 Project Euler problems in Golang. The solutions for the problems are all available at: Contribute to leogtzr/15_projecteuler_solutions_Golang development by creating an account on GitHub.170
A Tour of Go 1.16's io/fs packageThe upcoming Go 1.16 release has a lot of exciting updates in it, but my most anticipated addition to the Go standard library is the new io/fs and testing/testfs packages. Go’s io.Reader and io.Writer interfaces, along with os.1354
Build a Simple To-Do List App in GolangThis blog is originally published on my personal blog. I’ve wanted to learn Golang for a long time. According to a Stack Overflow survey, Golang was the third-most wanted programming language in the year 2019.168
Visualize Go process metrics in real-timeOne day, it became necessary to have a tool to easily observe resource consumption trends of a Go process. I’m aware that there are tons of APM tools out there; also, Go has enough profiling tools including pprof. I poked around the internet but nothing worked as well as I would like.749
Go: How Does a Goroutine Start and Exit?In Go, a goroutine is nothing but a Go structure containing information regarding the running program, such as stack, program counter, or its current OS thread. The Go scheduler deals with that information to give them running time.79
How to create a CLI in golang with cobraHave you ever wondered why in the world of GUI, CLI still exists? You’ll better understand it when you build one of your own. When you learn golang then it is very often that you’ll come across that ‘golang is great to build cli tools’. This fascinated me too.2780
Go: Thoughts About CobraCobra is one of the most famous projects in the Golang ecosystem. It is simple, efficient, and gets great support from the Go community. Let’s discover it. It is quite easy to understand how internal commands work if you get used to Cobra, andvice versa.111
GoLang: Building a Web ServerWhen you read the term web server, what pops up in your mind? Having worked on Java before I moved on to GoLang, the very first thing that comes to me is Spring and its complex configurations. So, here I welcome you to the world of GoLang where things are as simple as they can be.414
Using SSE in Go web serverOriginal Gopher image created by Renee French, used Gopher image created by Maria Lettapart: creating the service part: improving the service part: upgrade for web part: you are reading it right now part: simple javascript frontend functionality part: frontend — backend communication part: server-135
Extending GObjects From Go and Making Them Available to CWhen I first started writing my GStreamer bindings for go, I had never done C library bindings before. I had written small programs in C for fun, but most of my professional work was either Go, Python, or just pure BASH.7152
Writing an RPC server in GoHey fellow coders, in the last article we learned how to Write Fx Modules and added a logging module into our project. Continuing on the same codebase, we will add support for serving RPC requests. RPC stands for Remote Procedure Call.645
Go, HTTP handlers, panic, and deadlocksMaybe the scenario I'm going to describe is just a silly bug no seasoned Go developer would ever make, but it is what it is. I'm not an expert in Go but I do write code in this language from time to time.1529
Go security cheatsheet: 8 security best practices for Go developersIn this installment of our cheatsheet series, we’re going to cover eight Go security best practices for Go developers.1851
Course: Develop A Production Ready REST API in GoWelcome Gophers! In this course, we’ll be covering absolutely everything you need in order to get up and running developing Production-ready REST APIs using Go. Throughout this course, we’ll be looking at how you can build a Comment system for your own sites or projects.266
How Buffer Pool Works: An Implementation In GoI have been exploring how disk-oriented databases efficiently move data in and out of disk. One way, that I explored in Discovering and exploring mmap using Go and But how, exactly, databases use mmap?, is through memory-mapped files. Although mmap is a really neat solution, it has some troubles.2750
Structure size optimization in Golang (alignment/padding). More effective memory layout (linters).Today I would like to tell you about the alignment of structures in Golang. The capacity of the machines is growing every year. And our computing power allows us to perform increasingly demanding tasks.800
Application Security ManagementDatadog Application Security Management allows you to manage application security risk with continuous, real-time monitoring of vulnerabilities and threats against your web applications, serverless applications, and APIs in production.55
Virtual Filesystem in Go - Creating the foundationHi all. I posted earlier this week about a virtual filesystem project I wanted to start on in Go. So, I wrote my first real technical writing on t84
What’s new in Go 1.16Go 1.16, the 17th major version of the Go programming language, has just been released. It is a significant upgrade that brings lots of long-awaited features and refinements to the language.2025
kuking/seof$ ./soaktest ed@luxuriance soaktest: seof soak test, creates a native file and a seof encrypted file. applies many different IO operations equally to both files and verifies both behave similar. You want a fast disk (NVMe). 1. Creating 2 x 256MB files: native.soak, seof.soak 2.369
https://michenriksen.com/archive/blog/finding-evil-go-packages/0
jdxyw/generativeartgenerativeart is a Go package to generate many kinds of generative art. The goal is to collect some excellent generative art (implemented in R or Processing), and rewrite them in Go again.1479
5 Common mistakes in GoBug-risks are issues in code that can cause errors and breakages in production. A bug is a flaw in the code that produces undesired or incorrect results.726
How I build web frontends in GoGo is a great language for building all kinds of backend services like APIs or microservices and many people use it for that. But what about web frontends, specifically dynamically rendered web applications? Let’s have a look&mldr;1515
Rust vs. Go: Why They’re Better TogetherSteve Francia Over the past 25 years Steve Francia has built some of the most innovative and successful technologies and companies which have become the foundation of cloud computing, embraced by enterprises and developers all over the world.2934
Practical Go Lessons0
How I create small Go apps quicklyI often want to create a small web application to test out an idea or demonstrate some thing, and I've developed a small toolbox that helps me do so in Go.1281
Automate Your Go Applications With Gradle & DockerThere’s a consistent demand for speed and efficiency when developing software solutions. Not only do your applications need to compile flawlessly, but today’s modern tech space has forced the “it works on my machine” phrase to become a vulgarity.206
How To Build a Basic Blockchain in GoBlockchain technologies have been referenced by some as the most influential invention since the internet itself. While the public interprets blockchain synonymously with speculative cryptocurrencies, blockchain actually has an incredibly broad range of applications for the modern world.197
Just released go-reddit v1.0.0, a Go library for accessing the Reddit API0
(Pre-Launch) Build a Twitter clone GraphQL API using Golang0
How to set up Vim for Go DevelopmentOne of the major reasons I love programming in Go is that I can do it in any IDE or editor I want, including my favourite Vim editor.1029
encoredev/encoreDevelopment Platform for building robust type-safe distributed systems with declarative infrastructure Encore provides Open Source development tools, from local development to your cloud: Backend frameworks: Encore.ts and Encore.2228
Rust vs. Go: Why They’re Better TogetherSteve Francia Over the past 25 years Steve Francia has built some of the most innovative and successful technologies and companies which have become the foundation of cloud computing, embraced by enterprises and developers all over the world.2934
Retraction: My Go executable files are still large (what's new in 2021)In 2019, we published an exploration of the size and makeup of the executable files produced by the Go compiler. CockroachDB engineers, the Go team, and the greater Go community were intrigued by the analysis, and the results of it pushed our projects further.407
main.goCode1
chronos-tachyon/roxyOur mascot, Roxy Lalonde. See our GitHub Pages site for more documentation.98
WebSocket communication between two Go programs, the easy wayThis article was written with one idea in mind: to show you, how to make a communication between two Go programs, using WebSockets. The simplest possible way.145
Issues with Golang (Google Go) SecurityGoogle Go (also known as Golang) continues its role as a popular software language that enables developers to ship quality code at a rapid pace.1245