Movatterモバイル変換


[0]ホーム

URL:


fserver

packagemodule
v0.0.3Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License:Apache-2.0Imports:9Imported by:1

Details

Repository

github.com/no-src/fserver

Links

README

fserver

BuildLicenseGo ReferenceGo Report CardRelease

Installation

go get -u github.com/no-src/fserver

Quick Start

package mainimport ("embed""github.com/no-src/fserver""github.com/no-src/log")// webDist the web dist resource////go:embed distvar webDist embed.FSfunc main() {defer log.Close()exit, port := fserver.InitFlag(printVersion, printAboutInfo)if exit {return}fserver.Run(port, "/dist", webDist)}func printVersion() {log.Log("version info")}func printAboutInfo() {log.Log("about info")}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcInitFlag

func InitFlag(versionFunc, aboutFunc func()) (exitbool, portint)

InitFlag init the default flags

funcRun

func Run(portint, pathPrefixstring, distembed.FS)

Run start the static file web server

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp