This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "strconv" | |
| import "fmt" | |
| type Color string | |
| type Make string | |
| type Model string | |
| const ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Lib | |
| + https://github.com/mikefarah/yaml/ | |
| + https://github.com/Masterminds/vert | |
| ## Best pratrices | |
| + https://talks.golang.org/2013/bestpractices.slide#11 | |
| + https://github.com/codeship/go-best-practices |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| ) | |
| func handler(w http.ResponseWriter, r *http.Request) { | |
| fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "net/http" | |
| "strings" | |
| "github.com/elazarl/go-bindata-assetfs" | |
| "github.com/gin-contrib/static" | |
| "github.com/gin-gonic/gin" | |
| "github.com/rdesousa/dashboard-gitlabv2/api" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component, Fragment } from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| import './msg.css'; | |
| var test_json = {"merge_request":[{"title":"WIP: Makefile V2","url":"https://gitlab.com/ritmx/infrastructure/provisioning/merge_requests/169"},{"title":"WIP: Add DNS Managed Zone for ritmx.com.","url":"https://gitlab.com/ritmx/infrastructure/provisioning/merge_requests/159"},{"title":"Suppression du répertoire /temp lors du lancement du service tomcat","url":"https://gitlab.com/ritmx/infrastructure/ansible-skeleton/merge_requests/8"}]}; | |
| class App extends Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| render(){ | |
| const numbers = [1, 2, 3, 4, 5]; | |
| const listItems = numbers.map((number) => | |
| <li>{number}</li> | |
| ); | |
| return ( | |
| <div>{listItems}</div> | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type MergeRequests struct { | |
| Title string `json:"title"` | |
| } | |
| func main() { | |
| resp, _ := http.Get("https://gitlab.com/api/v4/projects/4600432/merge_requests?private_token=") | |
| defer resp.Body.Close() | |
| body, _ := ioutil.ReadAll(resp.Body) | |
| var mrs []MergeRequests | |
| json.Unmarshal(body, &mrs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| ) | |
| func main() { | |
| resp, _ := http.Get("https://gitlab.com/api/v4/groups/1768437?private_token=XX") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stages: | |
| - build | |
| - publish | |
| build: | |
| stage: build | |
| script: make | |
| tags: | |
| - docker-builder |