Skip to content

Commit ab9c53f

Browse files
authored
chore: maintenance (#260)
1 parent 614418e commit ab9c53f

File tree

12 files changed

+64
-62
lines changed

12 files changed

+64
-62
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
1-
<!-- Thanks for filling an issue!
1+
### Actual Result / Problem
22

3-
If this is a BUG REPORT, please:
4-
- Fill in as much of the template below as you can
3+
When I do Foo, Bar happens...
54

6-
If this is a FEATURE REQUEST, please:
7-
- Describe *in detail* the feature/behavior/change you would like to see
8-
-->
5+
### Expected Result / Suggestion
96

10-
**What happened**:
7+
I expect that Foobar happens...
118

12-
**What you expected to happen**:
9+
### Some context
1310

14-
**How to reproduce it (as minimally and precisely as possible)**:
15-
16-
**Anything else we need to know?**:
17-
18-
<!--
19-
**Environment**:
20-
- sshportal --version
21-
- ssh sshportal info
22-
- OS (e.g. from /etc/os-release):
23-
- install method (e.g. go/docker/brew/...):
24-
- others:
25-
-->
11+
Any screenshot to share?
12+
`sshportal --version`?
13+
`ssh sshportal info`?
14+
OS/Go version?
15+
...

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
<!-- Thanks for sending a pull request! Here are some tips for you -->
2-
3-
**What this PR does / why we need it**:
4-
5-
**Which issue this PR fixes**: fixes #xxx, fixes #xxx...
6-
7-
**Special notes for your reviewer**:
1+
<!-- thank you for your contribution! ❤️ -->

AUTHORS

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

depaware.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ moul.io/sshportal dependencies: (generated by github.com/tailscale/depaware)
9696
hash from crypto+
9797
html from github.com/asaskevich/govalidator+
9898
io from bufio+
99-
io/ioutil from crypto/tls+
99+
io/fs from crypto/rand+
100+
io/ioutil from crypto/x509+
100101
log from github.com/gliderlabs/ssh+
101102
math from crypto/rsa+
102103
math/big from crypto/dsa+

go.mod

Lines changed: 2 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.sum

Lines changed: 31 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/tools/tools.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// +build tools
2+
3+
package tools
4+
5+
import (
6+
// required by depaware
7+
_ "github.com/tailscale/depaware/depaware"
8+
9+
// required by goimports
10+
_ "golang.org/x/tools/cover"
11+
)

pkg/bastion/shell.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ GLOBAL OPTIONS:
511511
"host_groups",
512512
"host_host_groups",
513513
"hosts",
514-
//"migrations",
515514
"sessions",
516515
"settings",
517516
"ssh_keys",
@@ -522,6 +521,7 @@ GLOBAL OPTIONS:
522521
"user_user_groups",
523522
"user_user_roles",
524523
"users",
524+
// "migrations",
525525
}
526526
for _, tableName := range tableNames {
527527
/* #nosec */
@@ -1459,7 +1459,6 @@ GLOBAL OPTIONS:
14591459
key.Name,
14601460
key.Type,
14611461
fmt.Sprintf("%d", key.Length),
1462-
//key.Fingerprint,
14631462
fmt.Sprintf("%d", len(key.Hosts)),
14641463
humanize.Time(key.UpdatedAt),
14651464
humanize.Time(key.CreatedAt),
@@ -2338,7 +2337,7 @@ GLOBAL OPTIONS:
23382337
if cliErr.ExitCode() != 0 {
23392338
fmt.Fprintf(s, "error: %v\n", err)
23402339
}
2341-
//s.Exit(cliErr.ExitCode())
2340+
// s.Exit(cliErr.ExitCode())
23422341
} else {
23432342
fmt.Fprintf(s, "error: %v\n", err)
23442343
}

pkg/bastion/telnet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func scannerSplitFunc(data []byte, atEOF bool) (advance int, token []byte, err e
7979
func telnetHandler(host *dbmodels.Host) ssh.Handler {
8080
return func(s ssh.Session) {
8181
// FIXME: log session in db
82-
//actx := s.Context().Value(authContextKey).(*authContext)
82+
// actx := s.Context().Value(authContextKey).(*authContext)
8383
caller := bastionTelnetCaller{ssh: s}
8484
if err := telnet.DialToAndCall(host.DialAddr(), caller); err != nil {
8585
fmt.Fprintf(s, "error: %v", err)

pkg/dbmodels/dbmodels.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,6 @@ func UserKeysByUserID(db *gorm.DB, identifiers []string) *gorm.DB {
410410

411411
// UserRole helpers
412412

413-
//func UserRolesPreload(db *gorm.DB) *gorm.DB {
414-
// return db.Preload("Users")
415-
//}
416413
func UserRolesByIdentifiers(db *gorm.DB, identifiers []string) *gorm.DB {
417414
return GenericNameOrID(db, identifiers)
418415
}
@@ -461,7 +458,6 @@ func (e *Event) Log(db *gorm.DB) {
461458
}
462459

463460
func (e *Event) SetAuthor(user *User) *Event {
464-
//e.Author = user
465461
e.AuthorID = user.ID
466462
return e
467463
}

0 commit comments

Comments
 (0)