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
//find "up" in slice and move it to begin of slice | |
func upslice(f *[]uint32, up uint32) { | |
if len((*f)) == 0 || (*f)[0] == up { | |
return | |
} | |
if (*f)[len(*f)-1] == up { | |
(*f) = append([]uint32{up}, (*f)[:len(*f)-1]...) | |
return | |
} |
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 ( | |
"github.com/tarantool/go-tarantool" | |
"gopkg.in/vmihailenco/msgpack.v2" | |
) | |
type AccountExample struct { | |
//magic here |
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
#!/usr/bin/tarantool | |
------------------------------------- Импортируем встроенные библиотеки ------------------------------------------ | |
json = require('json') | |
yaml = require('yaml') | |
fiber = require('fiber') | |
msgpack = require('msgpack') | |
-------------------------------------------------- Конфиг базы ------------------------------------------------------ |