io

go
package ingest

import (
  "bufio"
  "bytes"
  "io"

Avoid bufio.Scanner token limits by switching to Reader

go io logs
by Leah Thompson 1 tab
go
package feed

import "time"

type Event struct {
	ID        string    `json:"id"`

Stream and Decode Newline-Delimited JSON (NDJSON) from an HTTP Response Body in Go

go ndjson streaming
by codesnips 3 tabs
go
package upload

import (
	"bufio"
	"errors"
	"fmt"

Streaming Multipart Upload Handler With MIME Sniffing in Go

go http multipart
by codesnips 3 tabs
rust
use std::fs;
use std::io::Result;

fn main() -> Result<()> {
    let contents = fs::read_to_string("input.txt")?;
    println!("File contents: {}", contents);

File I/O with std::fs for reading and writing files

rust io files
by Marcus Chen 1 tab
ruby
require 'sinatra/base'
require_relative 'upload_store'

class UploadApp < Sinatra::Base
  MAX_BYTES = 50 * 1024 * 1024

Streaming Multipart File Uploads to Disk in Sinatra Without Buffering

sinatra rack file-upload
by codesnips 3 tabs
rust
use std::fs::File;
use std::io::{BufRead, BufReader, Result};

fn main() -> Result<()> {
    let file = File::open("input.txt")?;
    let reader = BufReader::new(file);

BufReader and BufWriter for efficient I/O buffering

rust io performance
by Marcus Chen 1 tab
go
package pipeline

import (
	"bufio"
	"errors"
	"io"

Stream and Transform a Large Log File Line-by-Line with bufio.Scanner

go streaming bufio
by codesnips 3 tabs
go
package upload

import (
	"errors"
	"io"
	"log"

Streaming Multipart File Uploads to Disk in Go net/http

go net-http multipart
by codesnips 3 tabs
rust
use std::error::Error;
use std::fmt;
use std::io;
use std::num::ParseIntError;

#[derive(Debug)]

Custom Error Enum With From Conversions for the ? Operator in Rust

rust error-handling traits
by codesnips 3 tabs
go
package main

import (
	"log"
	"net/http"
	"time"

Serving Partial Video Content with HTTP Range Requests in Go

go http range-requests
by codesnips 3 tabs