Skip to content

no idea what this code was doing... #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ install:
go install -v ./cmd/hype

hype:
pushd .hype;hype export -format=markdown -f hype.md > ../README.md;popd
hype export -format=markdown -f hype.md > ./README.md
20 changes: 1 addition & 19 deletions cmd/hype/cli/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ Examples:
}

func (cmd *Export) Main(ctx context.Context, pwd string, args []string) error {
err := cmd.main(ctx, pwd, args)
if err == nil {
return nil
}

cmd.mu.Lock()
to := cmd.Timeout
if to == 0 {
Expand All @@ -134,20 +129,7 @@ func (cmd *Export) Main(ctx context.Context, pwd string, args []string) error {
}
cmd.mu.Unlock()

ctx, cancel := context.WithTimeout(ctx, to)
defer cancel()

var mu sync.Mutex

go func() {
cancel()
}()

<-ctx.Done()

mu.Lock()
defer mu.Unlock()
return err
return cmd.main(ctx, pwd, args)
}

func (cmd *Export) main(ctx context.Context, pwd string, args []string) error {
Expand Down
Loading