Skip to content

Commit

Permalink
Merge pull request #31 from slashformotion/cleanup
Browse files Browse the repository at this point in the history
cleanup
  • Loading branch information
slashformotion authored Aug 4, 2024
2 parents 0f05379 + 8bc3b8c commit 7647e91
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 51 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,9 @@ on:
branches: [ '**' ]

jobs:
branch-naming-rules:
name: Check branch name
runs-on: ubuntu-latest
steps:
- uses: deepakputhraya/action-branch-name@master
with:
regex: '^(feature|bugfix|improvement|library|prerelease|release|hotfix|poc)\/[a-z0-9_.-]+$'
allowed_prefixes: 'feature,bugfix,improvement,library,prerelease,release,hotfix,poc'
ignore: master,main,dev
min_length: 5
max_length: 50

check-style:
name: Code style
needs: [branch-naming-rules]
runs-on: ubuntu-latest
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
Expand All @@ -47,7 +35,6 @@ jobs:

unit-tests:
name: Unit tests
needs: [branch-naming-rules]
runs-on: ubuntu-latest
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
Expand All @@ -74,7 +61,7 @@ jobs:
needs: [unit-tests]
strategy:
matrix:
go_version: ['1.18.x', '1.19.x', '1.20.x']
go_version: ['1.20.x', '1.21.x', '1.22.x']
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
Expand All @@ -93,4 +80,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: binary_${{ matrix.go_version }}
path: ./radioboat
path: ./radioboat
12 changes: 0 additions & 12 deletions cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ var lsCmd = &cobra.Command{
You need to have correct environment variables set up.
To do that please head to the wiki: https://github.com/slashformotion/radioboat/wiki/Configuration`,
Run: func(cmd *cobra.Command, args []string) {
// editor = osutil.GetOptEnv("EDITOR"))
// cm := exec.Command("nvim", urlFilePath, "</dev/tty")
prefEditor := os.Getenv("RADIOBOAT_EDITOR")
editor := os.Getenv("EDITOR")
if prefEditor != "" {
Expand All @@ -55,14 +53,4 @@ To do that please head to the wiki: https://github.com/slashformotion/radioboat/

func init() {
rootCmd.AddCommand(lsCmd)

// Here you will define your flags and configuration settings.

// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// lsCmd.PersistentFlags().String("foo", "", "A help for foo")

// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// lsCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
1 change: 1 addition & 0 deletions internal/utils/mathutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package utils
// See the License for the specific language governing permissions and
// limitations under the License.

// added because someone didn't like this proposal https://github.com/golang/go/issues/58146
func ClampInts(v, min, max int) int {
if v > max {
return max
Expand Down
24 changes: 0 additions & 24 deletions internal/utils/stringutils.go

This file was deleted.

16 changes: 16 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{pkgs ? import <nixpkgs> {}}:
pkgs.mkShell {
# nativeBuildInputs is usually what you want -- tools you need to run
nativeBuildInputs = with pkgs; [
gnumake

# go development
go
gopls
go-tools
delve

# lib
mpv
];
}

0 comments on commit 7647e91

Please sign in to comment.