repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/ocr.go | ocr.go | package Answer
import (
"github.com/henson/Answer/ocr"
"github.com/henson/Answer/util"
)
//Ocr ocr 识别图片文字
type Ocr interface {
GetText(imgPath string) (string, error)
}
//NewOcr 使用哪种ocr识别
func NewOcr(cfg *util.Config) Ocr {
if cfg.OCR == "tesseract" {
return ocr.NewTesseract()
}
return ocr.NewBaidu(cfg)
}
f... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/logic.go | logic.go | package Answer
import (
"sort"
)
//Answers 类型
type Answers struct {
content string
sum int32
freq int32
}
//AnswersList 类型
type AnswersList []*Answers
func (l AnswersList) Len() int {
return len(l)
}
func (l AnswersList) Less(i, j int) bool {
if l[i].freq < l[j].freq {
return true
} else if l[i].fr... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/process.go | process.go | package Answer
import (
"flag"
"fmt"
"os/exec"
"regexp"
"strings"
"sync"
"time"
"github.com/henson/Answer/api"
"github.com/henson/Answer/util"
"github.com/ngaut/log"
termbox "github.com/nsf/termbox-go"
)
var cfgFilename = flag.String("config", "config.yml", "配置文件路径")
var attentionWord = []string{"是错", "错误... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/automatic.go | automatic.go | package Answer
import (
"math/rand"
"os/exec"
"strconv"
"time"
"github.com/henson/Answer/device"
"github.com/henson/Answer/util"
"github.com/ngaut/log"
)
//PressArea 随机区域
func PressArea(choice int, cfg *util.Config) (x, y string) {
var P, H, K int
switch cfg.APP {
case "xigua":
P, H = cfg.XgAy, cfg.XgAh
... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/search.go | search.go | package Answer
import (
"fmt"
"net/url"
"regexp"
"strings"
"sync"
"github.com/PuerkitoBio/goquery"
"github.com/axgle/mahonia"
"github.com/henson/Answer/util"
"github.com/ngaut/log"
"github.com/yanyiwu/gojieba"
)
//SearchResult 搜索总数跟频率
type SearchResult struct {
Sum int32
Freq int32
}
//GetSearchResult ... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/util/cache.go | util/cache.go | package util
import (
"time"
cache "github.com/patrickmn/go-cache"
)
func init() {
//初始化cache
GetCache()
}
var c *cache.Cache
//GetCache 获取cache对象
func GetCache() *cache.Cache {
if c != nil {
return c
}
c = cache.New(5*time.Minute, 10*time.Minute)
return c
}
| go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/util/config.go | util/config.go | package util
import (
"io/ioutil"
"path/filepath"
yaml "gopkg.in/yaml.v1"
)
//Config 全局配置
type Config struct {
Debug bool `yaml:"debug"`
APP string `yaml:"app"`
Auto bool `yaml:"automatic"`
Device string `yaml:"device"`
OCR string `yaml:"ocr"`
AdbAddress ... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/util/util.go | util/util.go | package util
import (
"encoding/base64"
"errors"
"image"
"image/png"
"io/ioutil"
"os"
"strconv"
)
// MkDirIfNotExist 如果指定文件夹不存在则创建
func MkDirIfNotExist(path string) error {
if _, err := os.Stat(path); os.IsNotExist(err) {
return os.MkdirAll(path, 0755)
}
return nil
}
//OpenImageToBase64 OpenImageToBase64... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/util/http.go | util/http.go | package util
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"time"
)
//HTTPGet 代理请求
func HTTPGet(uri string, timeout int32) ([]byte, error) {
return HTTPGetCustom(uri, timeout, "", nil)
}
//HTTPGetCustom custom http client
func HTTPGetCustom(uri string, timeout int32, proxyURL string, header htt... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/util/const.go | util/const.go | package util
const (
DeviceiOS = "ios"
DeviceAndroid = "android"
ImagePath = "./images/"
QuestionImage = ImagePath + "question.png"
AnswerImage = ImagePath + "answer.png"
BaiduAccessTokenKey = "qanswer_baidu_access_token"
QuestionInCache = "something else"
)
| go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/util/character.go | util/character.go | package util
import "strings"
//UnicodeIndex 获取中文字符位置
func UnicodeIndex(str, substr string) int {
// 子串在字符串的字节位置
result := strings.Index(str, substr)
if result >= 0 {
// 获得子串之前的字符串并转换成[]byte
prefix := []byte(str)[0:result]
// 将子串之前的字符串转换成[]rune
rs := []rune(string(prefix))
// 获得子串之前的字符串的长度,便是子串在字符串的字符位置
... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/device/ios.go | device/ios.go | package device
import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"image"
"image/png"
"github.com/henson/Answer/util"
)
//IOS 获取iOS截图
type IOS struct {
wdaAddress string
}
type screenshotRes struct {
Value string `json:"value"`
SessionID string `json:"sessionId"`
Status int `json:"status"... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/device/android.go | device/android.go | package device
import (
"bytes"
"fmt"
"image"
"image/png"
"os/exec"
"github.com/henson/Answer/util"
)
//Android android
type Android struct{}
//NewAndroid new
func NewAndroid(cfg *util.Config) *Android {
return new(Android)
}
//GetImage 通过adb获取截图
/* func (android *Android) GetImage() (img image.Image, err e... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/cmd/main.go | cmd/main.go | package main
import "github.com/henson/Answer"
func main() {
Answer.Run()
}
| go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/ocr/baidu.go | ocr/baidu.go | package ocr
import (
"encoding/json"
"fmt"
"net/url"
"strings"
"sync"
"time"
"github.com/henson/Answer/util"
)
//Baidu baidu ocr api
type Baidu struct {
apiKey string
secretKey string
sync.RWMutex
}
type accessTokenRes struct {
AccessToken string `json:"access_token"`
ExpiresIn int32 `json:"expir... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/ocr/tesseract.go | ocr/tesseract.go | package ocr
import (
"os/exec"
)
//Tesseract tesseract 识别
type Tesseract struct{}
//NewTesseract new
func NewTesseract() *Tesseract {
return new(Tesseract)
}
//GetText 根据图片路径获取识别文字
func (tesseract *Tesseract) GetText(imgPath string) (string, error) {
body, err := exec.Command("tesseract", imgPath, "stdout", "-l"... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
henson/Answer | https://github.com/henson/Answer/blob/329d92cfcbe893047eb105470fce483881e2e040/api/sogou.go | api/sogou.go | package api
import (
"encoding/json"
"fmt"
"strings"
"time"
"github.com/henson/Answer/util"
"github.com/parnurzeal/gorequest"
)
//Sogos 搜狗json解析类型
type Sogos struct {
Code int `json:"code"`
Result []Reply `json:"result"`
}
//Reply 类型
type Reply struct {
Answers []string `json:"answers"`
CDID... | go | Apache-2.0 | 329d92cfcbe893047eb105470fce483881e2e040 | 2026-01-07T09:45:58.063399Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/main.go | main.go | package main
import (
"os"
"github.com/envoy49/go-spotify-cli/commands/player"
"github.com/envoy49/go-spotify-cli/commands/search"
"github.com/envoy49/go-spotify-cli/commands/flush"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/loader"
"github.com/sirupsen/logrus"
"github.com/... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/auth/openAuthUrl.go | auth/openAuthUrl.go | package auth
import (
"fmt"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/pkg/browser"
)
func buildSpotifyURL(params *cmdTypes.UrlParams) string {
return fmt.Sprintf(
"https://accounts.spotify.com/authorize?client_id=%s&response_type=code&redirect_uri=%s&scope=%s",
params.ClientID,
para... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/auth/fetchAuthToken.go | auth/fetchAuthToken.go | package auth
import (
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"strings"
"github.com/envoy49/go-spotify-cli/config"
"github.com/sirupsen/logrus"
)
type TokenResponse struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpiresIn uint ... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/loader/loader.go | loader/loader.go | package loader
import (
"sync"
"time"
"github.com/briandowns/spinner"
"github.com/sirupsen/logrus"
)
var (
instance *spinner.Spinner
once sync.Once
mu sync.Mutex
)
func InitializeSpinner() {
once.Do(func() {
instance = spinner.New(spinner.CharSets[17], 10*time.Millisecond)
if err := instance.C... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/styles.go | commands/styles.go | package commands
import "github.com/charmbracelet/lipgloss"
var HeaderStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("#101030")).
Background(lipgloss.Color("#51e2f5")).
MarginBottom(1).
MarginTop(1).
Bold(true)
var ValueStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("#51e2f5")).
Bold(true)
va... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/fetch.go | commands/fetch.go | package commands
import (
"encoding/json"
"fmt"
"io"
"net/http"
"sync"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/sirupsen/logrus"
)
type PlayerParams struct {
AccessToken string
Method string
Endpoint string
Body io.Reader
}
var fetchMutex sync.Mutex
func Fetch(pla... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/saved.go | commands/cmdTypes/saved.go | package cmdTypes
type SavedTracks struct {
Body
Items []SavedItem `json:"items"`
}
type SavedItem struct {
AddedAt string `json:"added_at"`
Track SavedTrack `json:"track"`
}
type SavedTrack struct {
Album SavedAlbum `json:"album"`
Artists []SavedArtist `json:"artists"`
Ava... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/albums.go | commands/cmdTypes/albums.go | package cmdTypes
type Albums struct {
Body
Items []AlbumItems `json:"items"`
}
type AlbumItems struct {
AlbumType string `json:"album_type"`
TotalTracks int `json:"total_tracks"`
AvailableMarkets []string `json:"available_markets"`
ExternalURLs m... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/episodes.go | commands/cmdTypes/episodes.go | package cmdTypes
type Episodes struct {
Body
Items []EpisodeItems `json:"items"`
}
type EpisodeItems struct {
AudioPreviewURL string `json:"audio_preview_url"`
Description string `json:"description"`
HTMLDescription string `json:"html_description"`
Durat... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/artists.go | commands/cmdTypes/artists.go | package cmdTypes
type ArtistsExternalURLs struct {
Spotify string `json:"spotify"`
}
type ArtistsFollowers struct {
Href string `json:"href"`
Total int `json:"total"`
}
type ArtistItems struct {
ExternalURLs ArtistsExternalURLs `json:"external_urls"`
Followers ArtistsFollowers `json:"followers"`
Genr... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/tracks.go | commands/cmdTypes/tracks.go | package cmdTypes
type Tracks struct {
Body
Items []TrackItems `json:"items"`
}
type TrackItems struct {
Album TracksAlbums `json:"album"`
Artists []TracksArtists `json:"artists"`
AvailableMarkets []string `json:"available_markets"`
DiscNumber int `json:"dis... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/player.go | commands/cmdTypes/player.go | package cmdTypes
type SpotifyResponse struct {
Device DeviceType `json:"device"`
ShuffleState bool `json:"shuffle_state"`
RepeatState string `json:"repeat_state"`
Timestamp int64 `json:"timestamp"`
Context Context `json:"context"`
ProgressM... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/search.go | commands/cmdTypes/search.go | package cmdTypes
type SpotifySearchResponse struct {
Tracks *Tracks `json:"tracks"`
Artists *Artists `json:"artists"`
Albums *Albums `json:"albums"`
Playlists *Playlists `json:"playlists"`
Shows *Shows `json:"shows"`
Episodes *Episodes `json:"episodes"`
Audiobooks *Audioboo... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/shows.go | commands/cmdTypes/shows.go | package cmdTypes
type Shows struct {
Body
Items []ShowItems `json:"items"`
}
type ShowItems struct {
AvailableMarkets []string `json:"available_markets"`
Copyrights []ShowCopyright `json:"copyrights"`
Description string `json:"description"`
HTMLDescription string ... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/playlists.go | commands/cmdTypes/playlists.go | package cmdTypes
type Playlists struct {
Body
Items []PlaylistItems `json:"items"`
}
type PlaylistItems struct {
Collaborative bool `json:"collaborative"`
Description string `json:"description"`
ExternalURLs map[string]string `json:"external_urls"`
Href string `jso... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/audiobooks.go | commands/cmdTypes/audiobooks.go | package cmdTypes
type Audiobooks struct {
Body
Items []AudiobookItems `json:"items"`
}
type AudiobookItems struct {
Authors []AudiobookAuthor `json:"authors"`
AvailableMarkets []string `json:"available_markets"`
Copyrights []AudiobookCopyright `json:"copyrights"`
Description s... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/cmdTypes/common.go | commands/cmdTypes/common.go | package cmdTypes
type Image struct {
URL string `json:"url"`
Height int `json:"height"`
Width int `json:"width"`
}
type SpotifyError struct {
Error struct {
Status int `json:"status"`
Message string `json:"message"`
Reason string `json:"reason"`
} `json:"error"`
}
type SpotifyAPIError struc... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/flush/flushSecrets.go | commands/flush/flushSecrets.go | package flush
import (
"os"
"github.com/envoy49/go-spotify-cli/config"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func FlushSecretsCommand(fetchType *config.FetchType) *cobra.Command {
return &cobra.Command{
Use: "flush-secrets",
Short: "Flush Secrets",
Run: func(cmd *cobra.Command, args []... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/flush/flushTokens.go | commands/flush/flushTokens.go | package flush
import (
"github.com/envoy49/go-spotify-cli/config"
"github.com/spf13/cobra"
)
var FlushTokensCommand = &cobra.Command{
Use: "flush-tokens",
Short: "Flush Tokens",
Run: func(cmd *cobra.Command, args []string) {
config.WriteTokenToHomeDirectory(nil, false)
},
}
| go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/search.go | commands/search/search.go | package search
import (
"net/url"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/player"
"github.com/envoy49/go-spotify-cli/commands/search/searchPrompt"
"github.com/envoy... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsAlbumsPrompt.go | commands/search/searchPrompt/searchResultsAlbumsPrompt.go | package searchPrompt
import (
"fmt"
"strconv"
"strings"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/manifoldco/promptui"
"github.com/sirupsen/logrus"
)
func AlbumsResultsPrompt(albums *cmdTypes.Albums) string {
formattedInfo := make([]string,... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsShowsPrompt.go | commands/search/searchPrompt/searchResultsShowsPrompt.go | package searchPrompt
import (
"fmt"
"strings"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/manifoldco/promptui"
"github.com/sirupsen/logrus"
)
func ShowsResultsPrompt(shows *cmdTypes.Shows) string {
formattedInfo := make([]string, len(shows.Ite... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/createSelectionPrompt.go | commands/search/searchPrompt/createSelectionPrompt.go | package searchPrompt
import (
"strings"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/manifoldco/promptui"
)
func CreateSelectionPrompt(config *cmdTypes.SelectionPromptConfig) promptui.Select {
return promptui.Select{
Label: config.Label,
Items: config.FormattedInfo,
Size: len(config.F... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsAudiobooksPrompt.go | commands/search/searchPrompt/searchResultsAudiobooksPrompt.go | package searchPrompt
import (
"fmt"
"strconv"
"strings"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/manifoldco/promptui"
"github.com/sirupsen/logrus"
)
func AudiobooksResultsPrompt(audiobooks *cmdTypes.Audiobooks) string {
formattedInfo := ma... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsArtistsPrompt.go | commands/search/searchPrompt/searchResultsArtistsPrompt.go | package searchPrompt
import (
"fmt"
"strconv"
"strings"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/manifoldco/promptui"
"github.com/sirupsen/logrus"
)
func ArtistsResultsPrompt(artists *cmdTypes.Artists) string {
formattedInfo := make([]stri... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchQueryPrompt.go | commands/search/searchPrompt/searchQueryPrompt.go | package searchPrompt
import (
"fmt"
"log"
"strconv"
"strings"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/manifoldco/promptui"
)
// var searchTypes = []string{"Track", "Artist", "Album", "Playlist", "Show", "Episode", "Audiobook"}.
var searchTypes = []string{"Track", "Episode"}
func Spot... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsTracksPrompt.go | commands/search/searchPrompt/searchResultsTracksPrompt.go | package searchPrompt
import (
"fmt"
"os"
"strconv"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/sirupsen/logrus"
"golang.org/x/term"
)
func TracksResultsPrompt(tracks *cmdTypes.Tracks) *cmdTypes.SearchPromptResults {
formattedInfo := make([]st... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsPrompt.go | commands/search/searchPrompt/searchResultsPrompt.go | package searchPrompt
import (
"encoding/json"
"log"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
)
func SpotifySearchResultsPrompt(body []byte) *cmdTypes.SearchPromptResults {
var response *cmdTypes.SpotifySearchResponse
err := json.Unmarshal(body, &response)
if err != nil {
log.Fatalf("Error decodi... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsPlaylistsPrompt.go | commands/search/searchPrompt/searchResultsPlaylistsPrompt.go | package searchPrompt
import (
"fmt"
"strings"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/manifoldco/promptui"
"github.com/sirupsen/logrus"
)
func PlaylistsResultsPrompt(playlists *cmdTypes.Playlists) string {
formattedInfo := make([]string, l... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/search/searchPrompt/searchResultsEpisodesPrompt.go | commands/search/searchPrompt/searchResultsEpisodesPrompt.go | package searchPrompt
import (
"fmt"
"os"
"strconv"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/sirupsen/logrus"
"golang.org/x/term"
)
func EpisodesResultsPrompt(episodes *cmdTypes.Episodes) *cmdTypes.SearchPromptResults {
formattedInfo := mak... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/saved.go | commands/player/saved.go | package player
import (
"encoding/json"
"fmt"
"log"
"os"
"strconv"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/commands/search/searchPrompt"
"github.com/envoy49/go-spotify-cli/config"
"golang.org/x/term"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/volume.go | commands/player/volume.go | package player
import (
"fmt"
"net/url"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/server"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
var VolumeValue string
fun... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/play.go | commands/player/play.go | package player
import (
"bytes"
"encoding/json"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/server"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func Play(cfg *confi... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/addToQueue.go | commands/player/addToQueue.go | package player
import (
"time"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/sirupsen/logrus"
)
func AddToQueue(cfg *config.Config, accessToken string, url string) {
time.Sleep(1 * time.Second) // add 1... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/device.go | commands/player/device.go | package player
import (
"encoding/json"
"fmt"
"log"
"strings"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/charmbracelet/lipgloss"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/server"
"github.com/manifoldco/p... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/next.go | commands/player/next.go | package player
import (
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/server"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func Next(cfg *config.Config, accessToken strin... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/player.go | commands/player/player.go | package player
import (
"encoding/json"
"fmt"
"time"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/server"
"github.com/sirupsen/logrus"
)
func Player(cfg *config.Config) {
time... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/activateDevice.go | commands/player/activateDevice.go | package player
import (
"bytes"
"encoding/json"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/server"
"github.com/sirupsen/logrus"
)
func ActivateDevice(cfg *config.Config, deviceIds string) {
jsonData := map[string]interface{}{
"... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/previous.go | commands/player/previous.go | package player
import (
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/server"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func previous(cfg *config.Config, accessToken s... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/endpoint.go | commands/player/endpoint.go | package player
const (
spotifyPlayerEndpoint = "https://api.spotify.com/v1/me"
)
| go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/commands/player/pause.go | commands/player/pause.go | package player
import (
"github.com/envoy49/go-spotify-cli/commands"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/server"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
func pause(cfg *config.Config, accessToken stri... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/routes/routes.go | routes/routes.go | package routes
import (
"net/http"
"sync"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/handlers"
)
var once sync.Once
func TokenHandlerWithParams(cfg *config.Config, tokenType config.TokenType) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
handlers.... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/handlers/html.go | handlers/html.go | package handlers
const (
content = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Spotify Authentication Success</title>
<style>
body {
font-family: "Helvetica Neue", Arial, sans-serif;
... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/handlers/tokenFlowHandler.go | handlers/tokenFlowHandler.go | package handlers
import (
"github.com/envoy49/go-spotify-cli/auth"
"github.com/envoy49/go-spotify-cli/commands/cmdTypes"
"github.com/envoy49/go-spotify-cli/config"
"github.com/sirupsen/logrus"
)
func StartAuthTokenFlow(cfg *config.Config, redirectionRoute string) {
params := &cmdTypes.UrlParams{
ClientID: ... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/handlers/tokenHandler.go | handlers/tokenHandler.go | package handlers
import (
"net/http"
"github.com/envoy49/go-spotify-cli/auth"
"github.com/envoy49/go-spotify-cli/config"
"github.com/sirupsen/logrus"
)
func TokenHandler(w http.ResponseWriter, r *http.Request, cfg *config.Config, tokenType config.TokenType) {
authCode := r.URL.Query().Get("code")
callbackURL :... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/server/getAuthToken.go | server/getAuthToken.go | package server
import (
"github.com/envoy49/go-spotify-cli/auth"
"github.com/envoy49/go-spotify-cli/config"
)
func ReadUserModifyTokenOrFetchFromServer(cfg *config.Config) string {
tokenInstance := config.ReadTokenFromHome(config.ModifyToken)
if len(tokenInstance.ModifyToken.UserModifyRefreshToken) > 0 {
newTok... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/server/server.go | server/server.go | package server
import (
"context"
"net/http"
"time"
"github.com/envoy49/go-spotify-cli/config"
"github.com/envoy49/go-spotify-cli/routes"
"github.com/sirupsen/logrus"
)
const (
serverPort = ":4949"
)
func Server(ctx context.Context, cfg *config.Config) {
// Create a new server instance each time
server :=... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/config/writeTokenToHome.go | config/writeTokenToHome.go | package config
import (
"os"
"path/filepath"
"time"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
)
var AuthTokenData = make(chan CombinedTokenStructure)
func getTokenExpiryTime(expiresIn int64) time.Time { // expiresIn should be actual time when it is going to expire
return time.Now().Add(time.Second * tim... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/config/readTokenFromHome.go | config/readTokenFromHome.go | package config
import (
"os"
"path/filepath"
"time"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
)
func isTokenExpired(expiryTime time.Time) bool {
return time.Now().After(expiryTime)
}
func ReadTokenFromHome(tokenType TokenType) *CombinedTokenStructure {
// Get the home directory for the current user
ho... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/config/writeSecretsToHome.go | config/writeSecretsToHome.go | package config
import (
"os"
"path/filepath"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
)
func WriteSecretsToHomeDirectory(cfg *Config) (*Config, error) { // pass this a struct one parameter
var configData *EnvVarConfig
if cfg != nil {
configData = &EnvVarConfig{
ClientId: cfg.ClientId,
Clien... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/config/secretsSetupPrompt.go | config/secretsSetupPrompt.go | package config
import (
"fmt"
"github.com/charmbracelet/lipgloss"
)
func SecretsSetupPrompt() {
// Header box style
headerBoxStyle := lipgloss.NewStyle().
Foreground(lipgloss.Color("black")).
Background(lipgloss.Color("#51e2f5")).
Bold(true).
PaddingTop(1).
PaddingBottom(1).
PaddingLeft(3).
Padding... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/config/token.go | config/token.go | package config
const (
UserModifyPlaybackStateRoute = "/user-modify-playback-state-auth"
UserModifyPlaybackStateRouteCallback = "/user-modify-playback-state-auth-callback"
UserModifyPlaybackStateScope = "user-modify-playback-state"
)
const (
UserReadPlaybackStateRoute = "/user-read-playbac... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/config/config.go | config/config.go | package config
import (
"errors"
"os"
"path/filepath"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
)
const (
projectName = "go-spotify-cli"
ServerUrl = "http://localhost:4949"
)
type Config struct {
ClientId string
ClientSecret string
RequestedScopes string
}
type EnvVarConfig struct {
Cl... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
Envoy49/go-spotify-cli | https://github.com/Envoy49/go-spotify-cli/blob/5e098621e927fda847a20309a5d9e1ead386b0bb/config/secretsPrompt.go | config/secretsPrompt.go | package config
import (
"bufio"
"fmt"
"os"
"regexp"
"strings"
"github.com/envoy49/go-spotify-cli/loader"
)
func SecretsPrompt(cfg *Config) *Config {
if !IsEmptyConfig(cfg) {
return nil
}
if VerifyConfigExists(cfg) {
return nil
}
loader.Stop()
SecretsSetupPrompt()
// Function to validate Spotify ... | go | MIT | 5e098621e927fda847a20309a5d9e1ead386b0bb | 2026-01-07T09:45:43.624198Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/uuid.go | uuid.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/http_client.go | http_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/tcp_service.go | tcp_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/client.go | client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/service.go | service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/filter.go | filter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/result_mode.go | result_mode.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/websocket_client.go | websocket_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/writer.go | writer.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | true |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/reader.go | reader.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | true |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/tags.go | tags.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/websocket_service.go | websocket_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/jsonrpc_service_filter.go | jsonrpc_service_filter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/formatter.go | formatter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/unix_service.go | unix_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/class_manager.go | class_manager.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/unix_client.go | unix_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/1_1_compatible.go | 1_1_compatible.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/tcp_client.go | tcp_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/jsonrpc_client_filter.go | jsonrpc_client_filter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/stream_service.go | stream_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/context.go | context.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/stream_client.go | stream_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/doc.go | doc.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/raw_reader.go | raw_reader.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/http_service.go | http_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/stream_common.go | stream_common.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/bench/hprosebench_test.go | bench/hprosebench_test.go | package hprosebench
import (
//"fmt"
"github.com/hprose/hprose-go"
"net"
"net/rpc"
"net/rpc/jsonrpc"
"testing"
)
func hello(name string) string {
return "Hello " + name + "!"
}
// BenchmarkHprose is ...
func BenchmarkHprose(b *testing.B) {
b.StopTimer()
server := hprose.NewTcpServer("")
server.AddFunction(... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/test/writer_test.go | test/writer_test.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.