Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

zliu.org/filestore

Package Overview
Dependencies
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zliu.org/filestore

Go Modules
Version
v0.0.0-20200229104338-5ea723a6a528
Version published
Created
Source

filestore

An append only file store, files are splited by time and size. Time interval could be day or hour, day by default.

Usage

package main

import (
	"log"

	"github.com/liuzl/filestore"
)

func main() {
	//fs, err := filestore.NewFileStore("db")
	fs, err := filestore.NewFileStorePro("db", "hour")
	if err != nil {
		log.Fatal(err)
	}
	data := []byte("hello world!\n")
	for i := 0; i < 100; i++ {
		if _, err = fs.Write(data); err != nil {
			log.Fatal(err)
		}
	}
	fs.Close()
}

FAQs

Package last updated on 29 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts