Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
// Copyright (c) 2015-2024 Jeevanandam M (jeeva@myjeeva.com), All rights reserved.
|
|
// resty source code and usage is governed by a MIT style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Package resty provides Simple HTTP and REST client library for Go.
|
|
package resty
|
|
|
|
import (
|
|
"net"
|
|
"net/http"
|
|
"net/http/cookiejar"
|
|
|
|
"golang.org/x/net/publicsuffix"
|
|
)
|
|
|
|
// Version # of resty
|
|
const Version = "2.16.5"
|
|
|
|
// New method creates a new Resty client.
|
|
func New() *Client {
|
|
cookieJar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List})
|
|
return createClient(&http.Client{
|
|
Jar: cookieJar,
|
|
})
|
|
}
|
|
|
|
// NewWithClient method creates a new Resty client with given [http.Client].
|
|
func NewWithClient(hc *http.Client) *Client {
|
|
return createClient(hc)
|
|
}
|
|
|
|
// NewWithLocalAddr method creates a new Resty client with the given Local Address.
|
|
// to dial from.
|
|
func NewWithLocalAddr(localAddr net.Addr) *Client {
|
|
cookieJar, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List})
|
|
return createClient(&http.Client{
|
|
Jar: cookieJar,
|
|
Transport: createTransport(localAddr),
|
|
})
|
|
}
|