This file contains 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
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: pv0001 | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
capacity: | |
storage: 8Gi | |
hostPath: |
This file contains 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
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <iterator> | |
template<typename Out> | |
void split(const std::string &s, char delim, Out result) { | |
std::stringstream ss(s); | |
std::string item; | |
while (std::getline(ss, item, delim)) { |
This file contains 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 api | |
import ( | |
"github.com/gin-gonic/gin" | |
endpoint_player "github.com/dwburke/addict-service/api/player" | |
) | |
func SetupRoutes(r *gin.Engine) { | |
endpoint_player.SetupRoutes(r) |
This file contains 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 "github.com/gin-gonic/gin" | |
func AllGinParams(c *gin.Context) gin.Params { | |
var params gin.Params | |
for _, p := range c.Params { | |
params = append(params, gin.Param{Key: p.Key, Value: p.Value}) | |
} | |
req := c.Request |
This file contains 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 ( | |
"github.com/dwburke/xxxx/cmd" | |
) | |
func main() { | |
cmd.Execute() | |
} |
This file contains 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 foo | |
type Foo struct { | |
Field string `json:"field"` | |
} | |
// UnmarshalJSON is the implementation of the json.Unmarshaler interface. | |
func (t *Foo) UnmarshalJSON(data []byte) error { | |
type innerFoo Foo | |
inner := &innerFoo{ |
This file contains 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 util | |
import ( | |
"bytes" | |
"text/template" | |
) | |
// Example: | |
// str := Tprintf("{{ .Thing }} a thing a do foo, bar", data) |
OlderNewer