wintundll-downloader-go

module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: Apache-2.0

README

wintundll-downloader-go

Go Report Card Documentation GitHub issues license

A small package to ensure the presence of the wintun dll from a golang program.

Usage:
package main

import (
	"log"
	"time"

	"github.com/borderzero/wintundll-downloader-go/wintundll"
)

func main() {
	err := wintundll.Ensure(
		wintundll.WithDownloadURL("https://www.wintun.net/builds/wintun-0.14.1.zip"),
		wintundll.WithDownloadTimeout(time.Second*10),
		wintundll.WithDllPathInUnzippedDir("wintun/bin/x86/wintun.dll"),
		wintundll.WithDllPathToEnsure(`C:\Windows\System32\wintun.dll`),
	)
	if err != nil {
		log.Fatal("failed to ensure the presence of the wintun.dll file")
	}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL