Sha256: 7badd9e853aa5e83ff0ae7869d5c6e4ff4add4362f84afcb6b00a9adf609e93f

Contents?: true

Size: 452 Bytes

Versions: 2

Compression:

Stored size: 452 Bytes

Contents

require "rake"

module Peppermint
end

task :"go:fmt" do
  if File.file? "go.mod"
    sh <<~SHELL
      find . \\( -not -path '*/target/*' \\) \
        -and \\( -not -path '*/node_modules/*' \\) \
        -and \\( -not -path '*/dist/*' \\) \
        -and \\( -not -path '*/doc/*' \\) \
        -and \\( -name '*.go' \\) \
        -and -type f | xargs -r go fmt
    SHELL
  end
end

task :"go:fix" do
  if File.file? "go.mod"
    sh "go fix"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
peppermint-0.1.9 lib/peppermint/rake/go.rb
peppermint-0.1.8 lib/peppermint/rake/go.rb