Skip to content

Commit

Permalink
From camelCase to snake_case
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel González Lopes <[email protected]>
  • Loading branch information
dgzlopes committed Apr 5, 2023
1 parent b39b058 commit 3a8f5c0
Show file tree
Hide file tree
Showing 15 changed files with 96 additions and 80 deletions.
2 changes: 1 addition & 1 deletion data.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"caloriesPerSlice": 300
}
],
"oliveOils": [
"olive_oils": [
{
"name": "Extra virgin olive oil",
"caloriesPerSlice": 50,
Expand Down
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,24 @@ require (
github.com/go-chi/chi v1.5.4
github.com/go-chi/cors v1.2.1
github.com/olahol/melody v1.1.3
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_golang v1.14.1-0.20221122130035-8b6e68085b10
github.com/rs/xid v1.4.0
go.uber.org/zap v1.24.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
go.uber.org/atomic v1.8.0 // indirect
go.uber.org/goleak v1.2.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/sys v0.6.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
20 changes: 12 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand All @@ -115,7 +116,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
Expand Down Expand Up @@ -150,8 +152,9 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
Expand All @@ -172,8 +175,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw=
github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y=
github.com/prometheus/client_golang v1.14.1-0.20221122130035-8b6e68085b10 h1:anoQbV7TlbkxeFsnKa/KNQoPTdZBA/bt3wdQnf9uPt4=
github.com/prometheus/client_golang v1.14.1-0.20221122130035-8b6e68085b10/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
Expand Down Expand Up @@ -217,7 +220,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4=
go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo=
go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec=
go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
Expand Down Expand Up @@ -343,8 +347,8 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
12 changes: 6 additions & 6 deletions k6/01.basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export const options = {

export default function () {
let restrictions = {
"maxCaloriesPerSlice": 1000,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand Down
12 changes: 6 additions & 6 deletions k6/02.stages.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ export const options = {

export default function () {
let restrictions = {
"maxCaloriesPerSlice": 1000,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand Down
12 changes: 6 additions & 6 deletions k6/03.lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export function setup() {

export default function () {
let restrictions = {
"maxCaloriesPerSlice": 1000,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand Down
12 changes: 6 additions & 6 deletions k6/04.metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ export function setup() {

export default function () {
let restrictions = {
"maxCaloriesPerSlice": 500,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand Down
12 changes: 6 additions & 6 deletions k6/05.thresholds.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export function setup() {

export default function () {
let restrictions = {
"maxCaloriesPerSlice": 500,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand Down
14 changes: 8 additions & 6 deletions k6/06.summary.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import http from "k6/http";
import { check, sleep } from "k6";
import { Trend, Counter } from "k6/metrics";
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.2/index.js";

const BASE_URL = __ENV.BASE_URL || 'http://localhost:3333';

Expand Down Expand Up @@ -29,12 +30,12 @@ export function setup() {

export default function () {
let restrictions = {
"maxCaloriesPerSlice": 500,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand All @@ -52,5 +53,6 @@ export default function () {
export function handleSummary(data) {
return {
'summary.json': JSON.stringify(data, null, 2),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}
14 changes: 8 additions & 6 deletions k6/07.scenarios.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import http from "k6/http";
import { check, sleep } from "k6";
import { Trend, Counter } from "k6/metrics";
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.2/index.js";

const BASE_URL = __ENV.BASE_URL || 'http://localhost:3333';

Expand Down Expand Up @@ -43,12 +44,12 @@ export function setup() {

export function getPizza() {
let restrictions = {
"maxCaloriesPerSlice": 500,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand All @@ -71,5 +72,6 @@ export function teardown(){
export function handleSummary(data) {
return {
'summary.json': JSON.stringify(data, null, 2),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}
14 changes: 8 additions & 6 deletions k6/08.data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import http from "k6/http";
import { check, sleep } from "k6";
import { Trend, Counter } from "k6/metrics";
import { SharedArray } from 'k6/data';
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.2/index.js";

const BASE_URL = __ENV.BASE_URL || 'http://localhost:3333';

Expand Down Expand Up @@ -48,12 +49,12 @@ export function setup() {

export function getPizza() {
let restrictions = {
"maxCaloriesPerSlice": 500,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand All @@ -76,5 +77,6 @@ export function teardown(){
export function handleSummary(data) {
return {
'summary.json': JSON.stringify(data, null, 2),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}
14 changes: 8 additions & 6 deletions k6/09.composability.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import http from "k6/http";
import { check, sleep } from "k6";
import { Trend, Counter } from "k6/metrics";
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.2/index.js";
import { SharedArray } from 'k6/data';
import { chromium } from 'k6/experimental/browser';

Expand Down Expand Up @@ -55,12 +56,12 @@ export function setup() {

export function getPizza() {
let restrictions = {
"maxCaloriesPerSlice": 500,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand Down Expand Up @@ -99,5 +100,6 @@ export function teardown(){
export function handleSummary(data) {
return {
'summary.json': JSON.stringify(data, null, 2),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}
14 changes: 8 additions & 6 deletions k6/10.library.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import http from "k6/http";
import { check, sleep } from "k6";
import { Trend, Counter } from "k6/metrics";
import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.2/index.js";
import { SharedArray } from 'k6/data';
import { chromium } from 'k6/experimental/browser';
import { LoadAndCheck } from "./shared/frontend/basic.js";
Expand Down Expand Up @@ -56,12 +57,12 @@ export function setup() {

export function getPizza() {
let restrictions = {
"maxCaloriesPerSlice": 500,
"mustBeVegetarian": false,
"excludedIngredients": ["pepperoni"],
"excludedTools": ["knife"],
"maxNumberOfToppings": 6,
"minNumberOfToppings": 2
max_calories_pers_slice: 500,
must_be_vegetarian: false,
excluded_ingredients: ["pepperoni"],
excluded_tools: ["knife"],
max_number_of_toppings: 6,
min_number_of_toppings: 2
}
let res = http.post(`${BASE_URL}/api/pizza`, JSON.stringify(restrictions), {
headers: {
Expand All @@ -88,5 +89,6 @@ export function teardown(){
export function handleSummary(data) {
return {
'summary.json': JSON.stringify(data, null, 2),
stdout: textSummary(data, { indent: " ", enableColors: true }),
}
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type Data struct {
Doughs []pizza.Dough `json:"doughs"`

// Ingredients
OliveOils []pizza.Ingredient `json:"oliveOils"`
OliveOils []pizza.Ingredient `json:"olive_oils"`
Tomatoes []pizza.Ingredient `json:"tomatoes"`
Mozzarellas []pizza.Ingredient `json:"mozzarellas"`
Toppings []pizza.Ingredient `json:"toppings"`
Expand Down
12 changes: 6 additions & 6 deletions pkg/pizza/pizza.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ func (p Pizza) CalculateCalories() int {
}

type Restrictions struct {
MaxCaloriesPerSlice int `json:"maxCaloriesPerSlice"`
MustBeVegetarian bool `json:"mustBeVegetarian"`
ExcludedIngredients []string `json:"excludedIngredients"`
ExcludedTools []string `json:"excludedTools"`
MaxNumberOfToppings int `json:"maxNumberOfToppings"`
MinNumberOfToppings int `json:"minNumberOfToppings"`
MaxCaloriesPerSlice int `json:"max_calories_per_slice"`
MustBeVegetarian bool `json:"must_be_vegetarian"`
ExcludedIngredients []string `json:"excluded_ingredients"`
ExcludedTools []string `json:"excluded_tools"`
MaxNumberOfToppings int `json:"max_number_of_toppings"`
MinNumberOfToppings int `json:"min_number_of_toppings"`
}

0 comments on commit 3a8f5c0

Please sign in to comment.