Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config provides configuration management for the gofs HTTP file server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host           string
	Dir            string
	Port           int
	MaxFileSize    int64
	RequestTimeout int
	EnableSecurity bool
}

Config holds the server configuration.

func New

func New(port int, host, dir string) (*Config, error)

New creates a new configuration with the provided values. Zero values are replaced with sensible defaults.

func (*Config) Address

func (c *Config) Address() string

Address returns the network address to listen on.

Jump to

Keyboard shortcuts

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