Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

wabarc/go-anonfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-anonfile

go-anonfile is a toolkit to help upload files to anonfiles.

Installation

The simplest, cross-platform way is to download from GitHub Releases and place the executable file in your PATH.

Via Golang package get command

go get -u github.com/wabarc/go-anonfile/cmd/anonfile

From gobinaries.com:

$ curl -sf https://gobinaries.com/wabarc/go-anonfile | sh

Usage

Command-line:

$ anonfile
A CLI tool help upload files to anonfiles.

Usage:

  anonfile [options] [file1] ... [fileN]

Go package:

import (
        "fmt"

        "github.com/wabarc/go-anonfile"
)

func main() {
        if url, err := anonfile.NewAnonfile(nil).Upload(path); err != nil {
            fmt.Fprintf(os.Stderr, "anonfiles: %v\n", err)
        } else {
            fmt.Fprintf(os.Stdout, "%s  %s\n", url, path)
        }
}

License

This software is released under the terms of the MIT. See the LICENSE file for details.