Skip to content

Commit 119dda7

Browse files
committed
refactor: migrate to go
Go is a really nice language, and I’ve been enjoying it a lot recently. Although I still like C#, I’ve found myself growing more distant from it. For this specific project, C# doesn't feel like a great fit and often feels like it's just making things harder From my experience, C# excels at enterprise-level backend development, but when you want to build something command-line focused or "community-oriented," Go is the better choice From a personal standpoint, Go is much nicer to work with on this project - especially with the Charm (Charmbracelet) ecosystem. It’s amazing, and the Go code is overall much more readable than the C# code we had here before
1 parent 1427449 commit 119dda7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+6840
-3410
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.go]
10+
indent_style = tab
11+
indent_size = 4
12+
13+
[go.mod]
14+
indent_style = tab
15+
indent_size = 4
16+
17+
[go.sum]
18+
indent_style = tab
19+
indent_size = 4

.github/assets/dis_help.png

89.6 KB
Loading

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6.0.2
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-go@v6.3.0
20+
with:
21+
go-version-file: go.mod
22+
23+
- uses: goreleaser/goreleaser-action@v7.0.0
24+
with:
25+
args: release --clean
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/rolling.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Rolling Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency:
9+
group: rolling-release
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
rolling:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v6.0.2
20+
with:
21+
fetch-depth: 0
22+
23+
- uses: actions/setup-go@v6.3.0
24+
with:
25+
go-version-file: go.mod
26+
27+
- uses: goreleaser/goreleaser-action@v7.0.0
28+
with:
29+
args: release --snapshot --clean
30+
31+
- name: Delete existing rolling release
32+
run: gh release delete rolling --yes --cleanup-tag || true
33+
env:
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- uses: softprops/action-gh-release@v2.5.0
37+
with:
38+
tag_name: rolling
39+
name: Rolling Release
40+
prerelease: true
41+
files: |
42+
dist/*.deb
43+
dist/*.rpm
44+
dist/*.tar.gz
45+
dist/*.zip
46+
dist/checksums.txt

.gitignore

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,23 @@
1-
**/bin/
2-
**/obj/
3-
*.user
4-
*.userosscache
5-
*.suo
6-
*.lock.json
7-
!deps.json
8-
*.nupkg
9-
*.log
10-
*.bak
11-
.DS_Store
12-
*.swp
13-
**/.idea/
1+
# Go binary
2+
/dis
3+
4+
# IDE
145
**/.vs/
156
**/.vscode/
16-
**/packages/
17-
18-
# auto generated files
19-
*.dll
20-
*.exe
21-
*.pdb
22-
*.rsp
23-
*.cache
24-
*.csproj.user
25-
26-
.history/
27-
*.vsix
28-
29-
# Test Results and Logs from build processes
30-
**/TestResults/
31-
**/[Bb]in/
32-
**/[Oo]bj/
33-
**/[Ll]og/
34-
**/[Ll]ogs/
35-
**/[Tt]emp/
36-
**/[Tt]mp/
377

38-
# User-Specific files and other generated files
39-
*.userprefs
40-
*.sln.docstates
41-
42-
# Package Files #
43-
*.snk
8+
# OS
9+
.DS_Store
10+
*.swp
4411

4512
# Nix
4613
.direnv/
4714
.devenv/
4815
result
4916
out/
17+
18+
# GoReleaser
19+
dist/
20+
21+
# Misc
22+
*.log
23+
*.bak

.goreleaser.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: 2
2+
3+
builds:
4+
- env:
5+
- CGO_ENABLED=0
6+
goos:
7+
- linux
8+
- darwin
9+
- windows
10+
goarch:
11+
- amd64
12+
- arm64
13+
ldflags:
14+
- -s -w -X dis/cmd.Version={{ .Version }}
15+
16+
archives:
17+
- formats: [binary]
18+
format_overrides:
19+
- goos: windows
20+
formats: [binary]
21+
22+
nfpms:
23+
- vendor: dis
24+
homepage: https://github.com/flameflag/dis
25+
maintainer: flame
26+
description: A small and simple CLI and TUI tool designed to download, trim and compress videos for any website
27+
license: MIT
28+
section: video
29+
formats:
30+
- deb
31+
- rpm
32+
recommends:
33+
- ffmpeg
34+
- yt-dlp
35+
file_name_template: "{{ .ConventionalFileName }}"
36+
deb:
37+
lintian_overrides:
38+
- statically-linked-binary
39+
rpm:
40+
group: Unspecified
41+
42+
changelog:
43+
filters:
44+
include:
45+
- "^feat"
46+
- "^fix"
47+
- "^refactor"
48+
- "^perf"

Features/Common/Globals.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

Features/Common/Settings.cs

Lines changed: 0 additions & 69 deletions
This file was deleted.

Features/Common/TrimSettings.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

Features/Conversion/CodecParser.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)