2025年1月10日
formulas: Title: | link(file.asLink(), title)views: - type: table name: Table filters: and: - created_date == this.created_date - kind != "daily" order: - kind - formula.Title sort: - property: file.name direction: ASC columnSize: note.kind: 118- godashのScrapboxページに非推奨のテキストを入れる
- Goを使うときに困っている話をProjectsにマージする
- 五目チャーハン
- カップ麺
- 16:46 ギベンの録画をみてる
- 16:46 グレードの期待軸を達成したら「相当」であってるのか?
- 19:05 ほたてに外形監視ステータスコード出した、票はそうでもなかったけどコメントが多く付いて承認された
- 19:05 魁力屋のカップ麺食べた、思ったより再現されていてよかった
- 20:34 以下のコードが型エラーになってビルドできないが、match を外に出せば動いた。なんでだよ
Json.obj( "orgId" -> org.id, "name" -> org.value.name, "ingestionSpanLimit" -> getIngestionSpanLimit(org) match { case Some(limit) => JsNumber(limit) case None => JsNull })
private def getIngestionSpanLimit(org: Entity[models.types.user.Org]): Option[Long] = ???実際のエラー
[error] File.scala:23:18: constructor cannot be instantiated to expected type;[error] found : Some[A][error] required: (String, Option[Long])[error] case Some(limit) => JsNumber(limit)[error] ^[error] File.scala:23:41: type mismatch;[error] found : play.api.libs.json.JsNumber[error] required: (String, play.api.libs.json.Json.JsValueWrapper)[error] case Some(limit) => JsNumber(limit)[error] ^[error] File.scala:24:18: pattern type is incompatible with expected type;[error] found : None.type[error] required: (String, Option[Long])[error] case None => JsNull[error] ^[error] File.scala:24:33: type mismatch;[error] found : play.api.libs.json.JsNull.type[error] required: (String, play.api.libs.json.Json.JsValueWrapper)[error] case None => JsNull[error] ^