mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-19 04:15:06 +00:00
feat: update go boilerplate
This commit is contained in:
1 parent
181b48aff7
commit
f6fe61daac
7 files changed
+97
-88
No files matched your search
+14
-12
@@ -4,21 +4,23 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/emilybache/gildedrose-refactoring-kata/gildedrose"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("OMGHAI!")
|
||||
|
||||
var items = []*Item{
|
||||
&Item{"+5 Dexterity Vest", 10, 20},
|
||||
&Item{"Aged Brie", 2, 0},
|
||||
&Item{"Elixir of the Mongoose", 5, 7},
|
||||
&Item{"Sulfuras, Hand of Ragnaros", 0, 80},
|
||||
&Item{"Sulfuras, Hand of Ragnaros", -1, 80},
|
||||
&Item{"Backstage passes to a TAFKAL80ETC concert", 15, 20},
|
||||
&Item{"Backstage passes to a TAFKAL80ETC concert", 10, 49},
|
||||
&Item{"Backstage passes to a TAFKAL80ETC concert", 5, 49},
|
||||
&Item{"Conjured Mana Cake", 3, 6}, // <-- :O
|
||||
var items = []*gildedrose.Item{
|
||||
{"+5 Dexterity Vest", 10, 20},
|
||||
{"Aged Brie", 2, 0},
|
||||
{"Elixir of the Mongoose", 5, 7},
|
||||
{"Sulfuras, Hand of Ragnaros", 0, 80},
|
||||
{"Sulfuras, Hand of Ragnaros", -1, 80},
|
||||
{"Backstage passes to a TAFKAL80ETC concert", 15, 20},
|
||||
{"Backstage passes to a TAFKAL80ETC concert", 10, 49},
|
||||
{"Backstage passes to a TAFKAL80ETC concert", 5, 49},
|
||||
{"Conjured Mana Cake", 3, 6}, // <-- :O
|
||||
}
|
||||
|
||||
days := 2
|
||||
@@ -34,11 +36,11 @@ func main() {
|
||||
|
||||
for day := 0; day < days; day++ {
|
||||
fmt.Printf("-------- day %d --------\n", day)
|
||||
fmt.Println("name, sellIn, quality")
|
||||
fmt.Println("Name, SellIn, Quality")
|
||||
for i := 0; i < len(items); i++ {
|
||||
fmt.Println(items[i])
|
||||
}
|
||||
fmt.Println("")
|
||||
UpdateQuality(items)
|
||||
gildedrose.UpdateQuality(items)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user