Commit c0221482 authored by Trevor Slocum's avatar Trevor Slocum

Rename package gate to portal

parent feee3e0c
Pipeline #116032043 passed with stage
in 1 minute and 7 seconds
# sshtargate
[![GoDoc](https://gitlab.com/tslocum/godoc-static/-/raw/master/badge.svg)](https://docs.rocketnine.space/gitlab.com/tslocum/sshtargate/pkg/gate)
[![GoDoc](https://gitlab.com/tslocum/godoc-static/-/raw/master/badge.svg)](https://docs.rocketnine.space/gitlab.com/tslocum/sshtargate/portal)
[![CI status](https://gitlab.com/tslocum/sshtargate/badges/master/pipeline.svg)](https://gitlab.com/tslocum/sshtargate/commits/master)
[![Donate](https://img.shields.io/liberapay/receives/rocketnine.space.svg?logo=liberapay)](https://liberapay.com/rocketnine.space)
......
......@@ -12,7 +12,7 @@ import (
"syscall"
"github.com/anmitsu/go-shlex"
"gitlab.com/tslocum/sshtargate/pkg/gate"
"gitlab.com/tslocum/sshtargate/portal"
)
const (
......@@ -29,7 +29,7 @@ var (
printVersionInfo bool
configPath string
portals []*gate.Portal
portals []*portal.Portal
portalsLock = new(sync.Mutex)
done = make(chan bool)
......@@ -87,7 +87,7 @@ func main() {
address := address // Capture
go func() {
p, err := gate.NewPortal(pname, address, cs)
p, err := portal.New(pname, address, cs)
if err != nil {
log.Fatalf("failed to start portal %s on %s: %s", pname, address, err)
}
......
// Package gate provides SSH portals to applications.
package gate
// Package portal provides SSH portals to applications.
package portal
import (
"context"
......@@ -35,8 +35,8 @@ type Portal struct {
Server *ssh.Server
}
// NewPortal opens an SSH portal to an application.
func NewPortal(name string, address string, command []string) (*Portal, error) {
// New opens an SSH portal to an application.
func New(name string, address string, command []string) (*Portal, error) {
if address == "" {
return nil, errors.New("no address supplied")
} else if command == nil || command[0] == "" {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment