[XYZ-6] Add sampledata platform command (#8027)
* Add fake dependency * [XYZ-6] Add sampledata platform command * Creating EMOJI_NAME_MAX_LENGTH as a constant and using it where needed
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
0a9200c35d
Коммит
6990d052d5
2
vendor/github.com/minio/go-homedir/README.md
сгенерированный
поставляемый
2
vendor/github.com/minio/go-homedir/README.md
сгенерированный
поставляемый
@@ -13,4 +13,4 @@ it has a cgo dependency on Darwin systems. This means that any Go code
|
||||
that uses that package cannot cross compile. But 99% of the time the
|
||||
use for `os/user` is just to retrieve the home directory, which we can
|
||||
do for the current user without cgo. This library does that, enabling
|
||||
cross-compilation.
|
||||
cross-compilation.
|
||||
|
||||
3
vendor/github.com/minio/go-homedir/dir_posix.go
сгенерированный
поставляемый
3
vendor/github.com/minio/go-homedir/dir_posix.go
сгенерированный
поставляемый
@@ -1,8 +1,5 @@
|
||||
// +build !windows
|
||||
|
||||
// Copyright 2016 (C) Mitchell Hashimoto
|
||||
// Distributed under the MIT License.
|
||||
|
||||
package homedir
|
||||
|
||||
import (
|
||||
|
||||
3
vendor/github.com/minio/go-homedir/dir_windows.go
сгенерированный
поставляемый
3
vendor/github.com/minio/go-homedir/dir_windows.go
сгенерированный
поставляемый
@@ -1,6 +1,3 @@
|
||||
// Copyright 2016 (C) Mitchell Hashimoto
|
||||
// Distributed under the MIT License.
|
||||
|
||||
package homedir
|
||||
|
||||
import (
|
||||
|
||||
19
vendor/github.com/minio/go-homedir/homedir.go
сгенерированный
поставляемый
19
vendor/github.com/minio/go-homedir/homedir.go
сгенерированный
поставляемый
@@ -1,6 +1,3 @@
|
||||
// Copyright 2016 (C) Mitchell Hashimoto
|
||||
// Distributed under the MIT License.
|
||||
|
||||
// Package homedir implements a portable function to determine current user's homedir.
|
||||
package homedir
|
||||
|
||||
@@ -15,23 +12,25 @@ import (
|
||||
var DisableCache bool
|
||||
|
||||
var homedirCache string
|
||||
var cacheLock sync.Mutex
|
||||
var cacheLock sync.RWMutex
|
||||
|
||||
// Dir returns the home directory for the executing user.
|
||||
//
|
||||
// This uses an OS-specific method for discovering the home directory.
|
||||
// An error is returned if a home directory cannot be detected.
|
||||
func Dir() (string, error) {
|
||||
cacheLock.Lock()
|
||||
defer cacheLock.Unlock()
|
||||
|
||||
// Return cached homedir if available.
|
||||
if !DisableCache {
|
||||
if homedirCache != "" {
|
||||
return homedirCache, nil
|
||||
cacheLock.RLock()
|
||||
cached := homedirCache
|
||||
cacheLock.RUnlock()
|
||||
if cached != "" {
|
||||
return cached, nil
|
||||
}
|
||||
}
|
||||
|
||||
cacheLock.Lock()
|
||||
defer cacheLock.Unlock()
|
||||
|
||||
// Determine OS speific current homedir.
|
||||
result, err := dir()
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user