~f4814n/frost

0aefcd22ac4dffb4dfaf65f1a6be59fc7db3c012 — Fabian Geiselhart 11 months ago 8ce23f3
JS: Fix platform
4 files changed, 16 insertions(+), 11 deletions(-)

M build.sh
M cmd/frost/platform_js.go
M go.mod
M go.sum
M build.sh => build.sh +8 -0
@@ 9,6 9,10 @@ build_linux() {
	go build ./cmd/frost
}

build_wasm() {
	go run gioui.org/cmd/gogio -target js ./cmd/frost
}

case "$1" in
"android")
	set -x


@@ 18,4 22,8 @@ case "$1" in
	set -x 
	build_linux
	;;
"wasm")
	set -x
	build_wasm
	;;
esac

M cmd/frost/platform_js.go => cmd/frost/platform_js.go +5 -5
@@ 8,19 8,19 @@ import (
)

type Platform struct {
	log   *logrus.Entry
	Cache cache.Cache
	Logger *logrus.Logger
	Cache  cache.Cache
}

func InitPlatform() Platform {
	return Platform{
		Cache: new(cache.MemoryCache),
		log:   logrus.WithField("component", "platform_js"),
		Cache:  new(cache.MemoryCache),
		Logger: logrus.New(),
	}
}

func (p Platform) LoadConfig() (cfg AppConfig, err error) {
	p.log.Warn("This platform does not support persisting information")
	p.Logger.WithField("component", "platform").Warn("This platform does not support persisting information")
	return
}


M go.mod => go.mod +1 -1
@@ 5,7 5,7 @@ go 1.14
require (
	gioui.org v0.0.0-20201018162216-7a4b48f67b54
	gioui.org/cmd v0.0.0-20201020094634-d5bdf0756a5a
	git.sr.ht/~f4814n/matrix v0.0.0-20201117163840-4881dc01ab55
	git.sr.ht/~f4814n/matrix v0.0.0-20201119195633-ca71339e7b7e
	github.com/sirupsen/logrus v1.7.0
	golang.org/x/exp v0.0.0-20201008143054-e3b2a7f2fdc7
	golang.org/x/image v0.0.0-20200618115811-c13761719519

M go.sum => go.sum +2 -5
@@ 2,14 2,12 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7
gioui.org v0.0.0-20200726090130-3b95e2918359/go.mod h1:jiUwifN9cRl/zmco43aAqh0aV+s9GbhG13KcD+gEpkU=
gioui.org v0.0.0-20201018162216-7a4b48f67b54 h1:mM+tSH6C2GBkaErKviXhGL22qiGNgUMutvOYMyAsBK8=
gioui.org v0.0.0-20201018162216-7a4b48f67b54/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
gioui.org v0.0.0-20201116155112-01e8308a83fb h1:Koy7mY0TAvjA0x98FOx0kImcsjvTsnJnj+rIYhEybPE=
gioui.org v0.0.0-20201116155112-01e8308a83fb/go.mod h1:Y+uS7hHMvku1Q+ooaoq6fYD5B2LGoT8JtFgvmYmRzTw=
gioui.org/cmd v0.0.0-20201020094634-d5bdf0756a5a h1:BPgJqeQSxuX6CzFQ2EGDj4Kr2ZzwiqwdLyAYLXgxR+k=
gioui.org/cmd v0.0.0-20201020094634-d5bdf0756a5a/go.mod h1:dlmJnCEkOpRaChYxRmJZ5S4jk6y7DCfWnec39xGbUYk=
git.sr.ht/~f4814n/matrix v0.0.0-20201105194455-ef46d2c900a6 h1:G6SYycKY2PyeaBMhaHK3toX0eNpXmwBV74kK80SblPo=
git.sr.ht/~f4814n/matrix v0.0.0-20201105194455-ef46d2c900a6/go.mod h1:LinuYhN8Rh6XQ9Cy+XM1hTTZT6zDs6ONBTwXAoWCjI4=
git.sr.ht/~f4814n/matrix v0.0.0-20201117163840-4881dc01ab55 h1:eU6c32iLiDeJjmSNdLgbUGkv+Knvx4jxHcbgYCSmyAg=
git.sr.ht/~f4814n/matrix v0.0.0-20201117163840-4881dc01ab55/go.mod h1:LinuYhN8Rh6XQ9Cy+XM1hTTZT6zDs6ONBTwXAoWCjI4=
git.sr.ht/~f4814n/matrix v0.0.0-20201119195633-ca71339e7b7e h1:IDXjMbqs+q39NpdO9VR+Eg8X1DRWVyw8FRwhuX7163M=
git.sr.ht/~f4814n/matrix v0.0.0-20201119195633-ca71339e7b7e/go.mod h1:LinuYhN8Rh6XQ9Cy+XM1hTTZT6zDs6ONBTwXAoWCjI4=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/chromedp/cdproto v0.0.0-20191114225735-6626966fbae4 h1:QD3KxSJ59L2lxG6MXBjNHxiQO2RmxTQ3XcK+wO44WOg=


@@ 40,7 38,6 @@ github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.14.4 h1:4rQjbDxdu9fSgI/r3KN72G3c2goxknAqHHgPWWs8UlI=
github.com/mattn/go-sqlite3 v1.14.4/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=