Skip to content

Commit b31e51e

Browse files
committed
Remove OS User Group lookup
1 parent ed8466b commit b31e51e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Diff for: slackoverflow/application.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"os"
77
"os/user"
88
"path"
9-
"strconv"
109
"time"
1110

1211
"github.com/aframevr/slackoverflow/slack"
@@ -38,7 +37,6 @@ type Service struct {
3837
type Application struct {
3938
cwd string
4039
user *user.User
41-
group *user.Group
4240
startTime time.Time
4341
logLevel int
4442
projectPath string
@@ -207,11 +205,10 @@ func (so *Application) Debugging() bool {
207205

208206
// Start session
209207
func Start() *Application {
210-
gid := os.Getegid()
208+
211209
slackoverflow = &Application{}
212210
slackoverflow.cwd, _ = os.Getwd()
213211
slackoverflow.user, _ = user.Current()
214-
slackoverflow.group, _ = user.LookupGroupId(strconv.Itoa(gid))
215212
slackoverflow.startTime = time.Now()
216213
slackoverflow.projectPath = path.Join(slackoverflow.user.HomeDir, ".slackoverflow")
217214
slackoverflow.configFile = path.Join(slackoverflow.projectPath, "slackoverflow.yaml")

Diff for: slackoverflow/cmd-config.go

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ func (a *cmdConfig) Execute(args []string) error {
2929
si.AddRow("Userame", slackoverflow.user.Username)
3030
si.AddRow("Name", slackoverflow.user.Name)
3131
si.AddRow("User ID", slackoverflow.user.Uid)
32-
si.AddRow("Group", slackoverflow.group.Name)
3332
si.AddRow("Group ID", slackoverflow.user.Gid)
3433
si.Print()
3534

0 commit comments

Comments
 (0)