JohnStarich
Repos
82
Followers
67
Following
34

The in-browser IDE for Go

445
27

💸 Download from your banks and credit cards straight to your computer

45
7

An extensible file system abstraction for Go. File systems, composable interfaces, and test suites.

205
7

This is a collection of my Go utilities in one easy-to-import place

41
8

An IndexedDB driver for Go code compiled to WebAssembly.

10
1

My config files and automated installation scripts I use on a day-to-day basis

4
0

Events

issue comment
gopages command doesn't work on windows properly, wipes out project

Ha, good point. Without context, it doesn't really make sense! I guess I meant to say it will proceed with the equivalent of os.RemoveAll() when any of those conditions are true. 😄

Created at 7 hours ago
issue comment
gopages command doesn't work on windows properly, wipes out project

@sacOO7 Should be all set with the latest release of gopages v0.1.16. Can you give that a shot? (Also in a sandbox at first, to be extra safe!)

Created at 12 hours ago
create tag
JohnStarich create tag gopages/v0.1.17
Created at 12 hours ago
closed issue
gopages command doesn't work on windows properly, wipes out project
  • go version go1.19.3 windows/amd64
  • When gopages is run, it generates doc but it's recursive and it doesn't close after running.
  • Links pointing to embedded go source code are broken.
  • There also seems to be some serious issue about how file paths are handled in windows, it mistakenly deleted my whole project after running the code
PS C:\Users\dummy\GolandProjects\dummy-go> gopages --out C:\Users\dummy\GolandProjects
Generating godoc static pages for module... github.com/tt/dummy-go
pipe: Failed to clean output directory: remove C:\Users\dummy\GolandProjects\dummy-go: The process cannot access the file because it is being used by another process.

This wiped out my entire project.

Created at 12 hours ago

gopages: Refuse to delete output directory unless it resembles a gopages result (#34)

Refuse to delete output directory unless it resembles a gopages result.

Now gopages only erases the output directory if:

  • The directory does not exist
  • OR the directory is empty
  • OR the lib, pkg, src directories, and index.html file are present

Fixes https://github.com/JohnStarich/go/issues/27

Created at 12 hours ago
delete branch
JohnStarich delete branch feature/gopages-detect-unsafe-delete
Created at 12 hours ago
pull request closed
gopages: Refuse to delete output directory unless it resembles a gopages result

Refuse to delete output directory unless it resembles a gopages result.

Now gopages only erases the output directory if:

  • The directory does not exist
  • OR the directory is empty
  • OR the lib, pkg, src directories, and index.html file are present

Fixes https://github.com/JohnStarich/go/issues/27

Created at 12 hours ago

Fix lint

Created at 12 hours ago
pull request opened
gopages: Refuse to delete output directory unless it resembles a gopages result

Refuse to delete output directory unless it resembles a gopages result.

Now gopages only erases the output directory if:

  • The directory does not exist
  • OR the directory is empty
  • OR the lib, pkg, src directories, and index.html file are present

Fixes https://github.com/JohnStarich/go/issues/27

Created at 12 hours ago

gopages: Refuse to delete output directory unless it resembles a gopages result

Created at 12 hours ago

gopages: Refuse to delete output directory unless it resembles a gopages result

Created at 12 hours ago
create branch
JohnStarich create branch feature/gopages-detect-unsafe-delete
Created at 12 hours ago
issue comment
gopages command doesn't work on windows properly, wipes out project

Great to hear on 1 and 2 🎉

Excellent, thanks. I'll keep that kind of server in mind if we hit further issues.

Interesting idea. Another option might be to include an HTTP file server inside the gopages command, since they're relatively easy to write in Go.

Created at 13 hours ago
issue comment
is hackpad/os writable?

Hey @jritsema, I'm glad you like it!

Yep, *os.FS is indeed writable. I think you're in the right place. Could you maybe share a small example that fails for you?

Also, can you share which file paths you're accessing on the *os.FS as well as which operating system you're using?

Created at 13 hours ago

httpdir: Add Go script to serve current directory via HTTP

httpdir: Open in browser

watch-dir: Switch watch-dir from Python to Go implementation

Created at 1 day ago
issue comment
gopages: building documentation for several modules

Hey @thomascoquet, glad they've been useful to you!

Interesting question. At the moment, gopages assumes you're publishing a single module which makes several internal processing steps simpler.

Are you picturing multiple modules linking seamlessly to one another? As of v0.1.14 and later, external modules should automatically link to the public docs at least. I'm open to exploring other options here though, sounds like it could be useful.

Created at 1 day ago
issue comment
HTML is not styled correctly for Go 1.19

Also, the .html extension is now included in source file links. Hope that helps!

Created at 1 day ago
issue comment
gopages command doesn't work on windows properly, wipes out project

@sacOO7 The fix for hanging on Windows has been merged. Also, the source code links might be fixed for you now. Please let me know which HTTP server you're using if they're still busted.

I haven't touched the -out flag behavior just yet, that's next.

Created at 1 day ago
create tag
JohnStarich create tag gopages/v0.1.16
Created at 1 day ago
pull request closed
gopages: Fix default source links not including `.html` extension

Fixes default source links not including .html extension.

Fixes a related issue mentioned in both https://github.com/JohnStarich/go/issues/25 and https://github.com/JohnStarich/go/issues/27

Created at 1 day ago

gopages: Fix default source links not including .html extension (#33)

Created at 1 day ago
delete branch
JohnStarich delete branch bugfix/html-link-extensions
Created at 1 day ago
closed issue
HTML is not styled correctly for Go 1.19

This is not working out of the box for simple package examples.

Running gopages yields html that is not styled, even though the required files are present under lib/godoc in the generated dist folder.

Running gopages -base "$(pwd)/dist/" yields html that is styled however, the source code is found to be missing when we try to navigate to it. This may be because the URL ends in /package_name.go#L5 instead of /package_name.go.html#L5, the latter producing well-styled html of the source code.

Created at 1 day ago
issue comment
HTML is not styled correctly for Go 1.19

@Aakanksh-z98 I think the issue is you're setting -base to a file path, when that should be a base URL path instead. The base defaults to / for static assets, which requires a full HTTP server (like Nginx or similar) to handle properly.

Closing since I haven't heard back in a while, but feel free to comment. We can always re-open.

Created at 1 day ago
pull request opened
gopages: Fix default source links not including `.html` extension

Fixes default source links not including .html extension.

Fixes a related issue mentioned in both https://github.com/JohnStarich/go/issues/25 and https://github.com/JohnStarich/go/issues/27

Created at 1 day ago
create branch
JohnStarich create branch bugfix/html-link-extensions
Created at 1 day ago
issue comment
Does the DNS package support domain scoped resolvers?

Looks like Go 1.20 will get a new libc based DNS resolver for macOS 🎉

https://github.com/golang/go/issues/12524#issuecomment-1302466054 https://github.com/golang/go/commit/a3559f3301b54468c14d4997af0d617db60f4915

That should fix any DNS inconsistencies completely 🙏

Created at 1 day ago
create tag
JohnStarich create tag gopages/v0.1.15
Created at 1 day ago