Skip to content

Instantly share code, notes, and snippets.

View includingByMeAndMyself's full-sized avatar
😈

Ivan Smirnov includingByMeAndMyself

😈
View GitHub Profile
@includingByMeAndMyself
includingByMeAndMyself / folder_structure.md
Created October 9, 2025 06:53 — forked from ayoubzulfiqar/folder_structure.md
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@includingByMeAndMyself
includingByMeAndMyself / asynchrony.cs
Created April 26, 2023 03:35
Для статьи по async/await для Яндекс.Дзен
// Synchronously copy all data from source to destination.
public void CopyStreamToStream(Stream source, Stream destination)
{
var buffer = new byte[0x1000];
int numRead;
while ((numRead = source.Read(buffer, 0, buffer.Length)) != 0)
{
destination.Write(buffer, 0, numRead);
}
}