FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Create base by kylecarbs · Pull Request #1 · coder/sshcode · GitHub

This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Repository navigation

Create base - #1

Merged
kylecarbs merged 4 commits into
masterfrom
core
Apr 19, 2019
Merged

kylecarbs merged 4 commits into
masterfrom
core

Conversation

Copy link
Copy Markdown
Member

No description provided.

kylecarbs requested a review from nhooyr April 19, 2019 00:54
Comment thread main.go Outdated

nhooyr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

🔥

Comment thread main.go
Comment thread main.go Outdated
Comment thread main.go Outdated
Comment thread main.go Outdated
Comment thread main.go Outdated
}

flog.Info("starting code-server...")
localPort := scanAvailablePort()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You can just use :0 to make ssh automatically use an available port. This is better than this as with this, a user on macOS will get a prompt asking if they want to let sshcode listen on the network, and then get another prompt for the ssh binary which is confusing.

Comment thread main.go
Comment thread main.go Outdated
Comment thread main.go Outdated
Comment thread main.go Outdated
Comment thread main.go Outdated

nhooyr commented Apr 19, 2019

Copy link
Copy Markdown
Contributor

Not bad at all for first time Go btw, most of my issues are just nitpicks.

Comment thread .sail/Dockerfile
kylecarbs force-pushed the core branch 3 times, most recently from 83c9b42 to 38698a8 Compare April 19, 2019 01:59
Comment thread main.go Outdated
Comment thread main.go Outdated
Comment thread main.go
`, os.Args[0])
}

flag.Parse()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Not a blocker but in the future, you don't need the flag library, you have no flags. You can directly use os.Args.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nvm, flag automatically gives you a -h flag which is nice. So this is the way to go.

Comment thread main.go Outdated
Comment thread main.go Outdated
Comment thread main.go Outdated
Comment thread main.go Outdated

nhooyr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

make sure you run gofmt -s -w . on the code.

Otherwise looks solid to me.

Congrats on passing your first @nhooyr software review 🎉 🔥

Comment thread main.go
`, os.Args[0])
}

flag.Parse()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nvm, flag automatically gives you a -h flag which is nice. So this is the way to go.

Comment thread main.go
var openCmd *exec.Cmd
if commandExists("google-chrome") {
openCmd = exec.Command("google-chrome", "--app="+url, "--disable-extensions", "--disable-plugins")
} else if commandExists("firefox") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I take it back. If neither of these exist, this program will panic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Comment thread main.go
var openCmd *exec.Cmd
if commandExists("google-chrome") {
openCmd = exec.Command("google-chrome", "--app="+url, "--disable-extensions", "--disable-plugins")
} else if commandExists("firefox") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Comment thread main.go Outdated

nhooyr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

💃

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL