File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ Following tasks are generated
48
48
49
49
* ` rake go:test `
50
50
* ` rake go:testrace `
51
+ * ` rake go:fmt `
51
52
52
53
#### Example (With config)
53
54
``` ruby
@@ -66,6 +67,7 @@ Following tasks are generated
66
67
67
68
* ` rake go5:test `
68
69
* ` rake go5:testrace `
70
+ * ` rake go5:fmt `
69
71
70
72
#### Available configurations
71
73
* ` task_namespace ` : task namespace (default: ` :go ` )
Original file line number Diff line number Diff line change @@ -78,6 +78,13 @@ def initialize(gem_name)
78
78
sh RakeTask . build_env_vars , "#{ go_bin_path } test #{ go_test_args } -race ./..."
79
79
end
80
80
end
81
+
82
+ desc "Run go fmt"
83
+ task ( :fmt ) do
84
+ within_target_dir do
85
+ sh "#{ go_bin_path } fmt ./..."
86
+ end
87
+ end
81
88
end
82
89
end
83
90
Original file line number Diff line number Diff line change 16
16
17
17
it { should be_task_defined ( "go:test" ) }
18
18
it { should be_task_defined ( "go:testrace" ) }
19
+ it { should be_task_defined ( "go:fmt" ) }
19
20
end
20
21
21
22
context "with params" do
30
31
31
32
it { should be_task_defined ( "go5:test" ) }
32
33
it { should be_task_defined ( "go5:testrace" ) }
34
+ it { should be_task_defined ( "go5:fmt" ) }
33
35
end
34
36
end
35
37
end
You can’t perform that action at this time.
0 commit comments