File tree Expand file tree Collapse file tree 3 files changed +41
-39
lines changed Expand file tree Collapse file tree 3 files changed +41
-39
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,23 @@ To regenerate the test cases, navigate into the **go** directory and run
225225` GO111MODULE=off go run exercises/practice/<exercise>/.meta/gen.go ` . You should see that the
226226` <exercise>/cases_test.go `  file has changed. Commit the change.
227227
228+ ## Managing the Go version  
229+ 
230+ For an easy managment of the Go version in the ` go.mod `  file in all exercises, we can use ` gomod-sync ` .
231+ This is a tool made in Go that can be seen in the ` gomod-sync/ `  folder.
232+ 
233+ To update all go.mod files according to the config file (` gomod-sync/config.json ` ) run:
234+ 
235+ ``` console 
236+ $ cd  gomod-sync &&  go run main.go update
237+ ``` 
238+ 
239+ To check all exercise go.mod files specify the correct Go version, run:
240+ 
241+ ``` console 
242+ $ cd  gomod-sync &&  go run main.go check
243+ ``` 
244+ 
228245## Pull requests  
229246
230247Pull requests are welcome.
Original file line number Diff line number Diff line change @@ -9,13 +9,29 @@ Some exercises must have its `go.mod` specify a Go version that is different fro
99This is supported by the ` exceptions `  key of the configuration file, where an entry must exist for each exercise
1010that must not have the default version.
1111
12+ ## Quick start  
13+ 
14+ To update all go.mod files according to the config file (gomod-sync/config.json) run:
15+ 
16+ ``` console 
17+ $ cd  gomod-sync
18+ $ go run main.go update 
19+ ``` 
20+ 
21+ To check all exercise go.mod files specify the correct Go version, run:
22+ 
23+ ``` console 
24+ $ cd  gomod-sync
25+ $ go run main.go check 
26+ ``` 
27+ 
1228## Installing  
1329
1430### Compiling locally  
1531
1632``` console 
17- cd gomod-sync 
18- go build 
33+ $  cd  gomod-sync
34+ $  go build 
1935``` 
2036
2137This will create an executable ` gomod-sync `  (` gomod-sync.exe `  in windows) in the current directory 
@@ -24,28 +40,26 @@ that you can run to execute the program.
2440### Running without compiling  
2541
2642``` console 
27- cd gomod-sync 
28- go run main.go [ command]  [flags] 
43+ $  cd  gomod-sync
44+ $  go run main.go < command>  [flags] 
2945``` 
3046
3147### Running the tests  
3248
3349``` console 
34- cd gomod-sync 
35- go test ./... 
50+ $  cd  gomod-sync
51+ $  go test  ./... 
3652``` 
3753
3854## Usage  
3955
4056``` 
41-   gomod-sync command  [flags] 
57+   gomod-sync commandUpdate gitig  [flags] 
4258
4359Available Commands: 
4460  check       Checks if all go.mod files are in the target version 
45-   completion  generate the autocompletion script for the specified shell 
46-   help        Help about any command 
47-   list        List go.mod files and the Go version they specify 
4861  update      Updates go.mod files to the target version 
62+   help        Help about any command 
4963
5064``` 
5165
Load Diff This file was deleted. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments