Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Optional-parameters/Go/optional-parameters-1.go
Normal file
20
Task/Optional-parameters/Go/optional-parameters-1.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
type cell string
|
||||
|
||||
type spec struct {
|
||||
less func(cell, cell) bool
|
||||
column int
|
||||
reverse bool
|
||||
}
|
||||
|
||||
func newSpec() (s spec) {
|
||||
// initialize any defaults
|
||||
return
|
||||
}
|
||||
|
||||
// sort with all defaults
|
||||
t.sort(newSpec())
|
||||
|
||||
// reverse sort
|
||||
s := newSpec
|
||||
s.reverse = true
|
||||
t.sort(s)
|
||||
Loading…
Add table
Add a link
Reference in a new issue